what chemicals aside from bicarb soda are present in pool ph buffer? Answered

Hello i just went to the dump shop and picked up a 4kg bag of bicarb soda as ph buffer for free, and when i got home, i noticed it smelt of ammonia, so i though it might have some ammonium carbonate, so i figured i could get rid of it by adding some water to the ph buffer and then boiling it. however, i have noticed that it turned my hands blue, and although the blue washed off, i am now hazardous as to what else may be in thr ph buffer, although it states sodium bicarbonate is the active ingredient. i plan on dividing it, selling 2kg on my site in 250g batches for $2 each, and the other i plan to use as a sodium source for my sodium reduction cell. i need to know though, what the other chemicals in the pool buffer are so i can state the purity of the ph buffer. also will anything lebeled as "soda ash" be pure sodium carbonate?

Question by oldmanbeefjerky   |  last reply


how to avoid using a jfet buffer?

I am trying to build an overdrive circuit, and it requires a jfet buffer, which i do not have, nor does radioshack (to the best of my knowledge), i do however have multiple mosfet buffers.  could i use these in place of the jfet, and if not, is there a way to remove the buffer altogether.  the scehmatic and diagram are here, i am trying to build the big daddy. thanks in advance!

Question by fatfoohy   |  last reply


iTunes keeps "Re-buffering stream"?

Hello! lately i have had a lot of troubles with iTunes, mostly it doesn't want to load or won't allow me to purchase things. i've tried reloading Itunes twice and that works for a day or two then its back to not working. i have got the latest version and a good internet connection. the most common problem lately is when i try to listen to a preview of a song it will play it for a few seconds then stop and say "opening URL Re-Buffering Stream" and that happens on every preview I've tried? it continually does it, saying that every few seconds... it worked fine yesterday and i was able to listen to previews without any trouble but this morning its back to the Re-buffering thing? i don't really want to call Apple help as there doesn't appear to be a section for this kind of thing and they ask for personal information... has anyone else had this problem and know how i can fix it? thank you! from AAG

Question by AussieAnglerGal   |  last reply


for audio buffer :TL072,BC107B,2SC1815 , which is lower noise ? Answered

Hello . I going to make a guitar pedal.In original schematic ,they use BC107B for audio buffer.But i dont have any BC107B in stock, so i decide to use TL072 or 2SC1815 to make audio buffer.But which is lower noise ? Thanks! sorry for my bad English.

Question by login721   |  last reply


wiring a dryer motor to cord for use as a grinder/buffer

Hello to anyone who can help me. I want to use a 110v dryer motor to make a grinder/buffer. The motor is a FSP brand and it has 3 terminals. The colors are blue,black and yellow. I just need to know how to connect to 2 wires outlet.

Question by Fifty-7   |  last reply


how xbee serial work?

Hello i read ultrasonic sensor serial connected to arduino but when i connect xbee between sensor and arduino and i configur my and dl matching and same id what i need to config else i work on 3,3v what i need to do to make it same as i read direct from sonar . this is my code reading from sonar and convert to distance ,i need same work on 2 xbee between sonar and arduino. #include SoftwareSerial mySerial(8, 9,true); // RX, TX int BW=4; char *buffer; byte x; char array[3]; int counter=0; void setup() {   // put your setup code here, to run once:   // set the data rate for the SoftwareSerial port   Serial.begin(9600);   mySerial.begin(9600);   pinMode(BW,OUTPUT);   digitalWrite(BW,LOW);   delay(250);   Serial.println("Calibrartion Cycle ");   delay(150); } void reading(){   mySerial.println(1); while (mySerial.available()) {    x= mySerial.readBytes(buffer,1);    if(*buffer==0x52){    x= mySerial.readBytes(buffer,1);    array[0]=*buffer;    x= mySerial.readBytes(buffer,1);    array[1]=*buffer;    x= mySerial.readBytes(buffer,1);    array[2]=*buffer;    } } delayMicroseconds(220); } void loop() {   // put your main code here, to run repeatedly:   reading();   int Final_inch=(array[0]-48)*100 + (array[1]-48)*10 +(array[2]-48) ;   float Final_cm=Final_inch*2.54;   Serial.print(Final_inch);   Serial.println(" Inch ");   Serial.print(Final_cm);   Serial.println(" cm ");   delay(200); }

Question by adiga123   |  last reply


whats the best way to care for scratched chrome on a motorbike? Answered

had my first fall today :( ended up scratching the exhaust...whats the best way to clean it up? im riding a yamaha xvs dragstar any additional information such as best way to keep the bike buffed/polished and generally clean and rust free will be much apreciated thanks

Question by dubpunkdub   |  last reply


digital potentiometer pid?

Hello, i have digital potintiometer u/d fgive you 100 step for 10k ohm so 10k for 100 step, i use it as outpu of pid control that read the distance and set point of required distance and make p and i and d equation based on differance and summation i want to use that pid to altitude contol of helicopter ,the resistor that i change as output is connected to throttle when i increase to max(5k) it stop and min 1k it go ?max speed so  this work   code arduino **/ #include #include SoftwareSerial mySerial(52, 9,true); // RX, TX int f=0; char *buffer; byte x; char array[27]; int counter=0; unsigned char r; int p=0; int last; int error=0; int wew; int required ; int kpipo; int n; DigiPot pot(22,3,24); void setup() {    Serial.begin(9600);   mySerial.begin(9600); } void reading(){   mySerial.println(1); while (mySerial.available()) {    x= mySerial.readBytes(buffer,1);    if(*buffer==0x52){    x= mySerial.readBytes(buffer,1);    array[0]=*buffer;    x= mySerial.readBytes(buffer,1);    array[1]=*buffer;    x= mySerial.readBytes(buffer,1);    array[2]=*buffer;    } } delayMicroseconds(220); } void loop() {     if (f==0){   delay(600);}   f=1; reading();   int Final_inch=(array[0]-48)*100 + (array[1]-48)*10 +(array[2]-48) ;   float Final_cm=Final_inch*2.54;     Serial.print(Final_inch);   Serial.println(" Inch ");   //Serial.print(Final_cm);   //Serial.println(" cm "); required =29; error = required - Final_inch; //Serial.print(error); //Integral = Integral + Error; // accumulate the error integral //} //else { // Integral=0; // zero it if out of bounds //} kpipo=1; p =  (error * kpipo); // calc proportional term // I = //Integral*kI; // integral term //int D = (Last-Actual)*.1; // derivative term wew = (error/2) ;// scale Drive to be in the range 0-99 Serial.print(wew);//(wew) if (abs(wew)>400){    wew=0;} if ( wew >99) {  wew=99; } if (wew <-99) {  wew=-99; } n=abs(wew); if (wew < 0){ // Check which direction to go.     pot.increase(n);     delay(500);   } else { // depending on the sign of Error     pot.decrease(n);     delay(500); } last = Final_inch; // save current value for next time }

Question by britich   |  last reply


what is the best way i can clean my motorbike at a reasonable price?

I have a yamaha xvs dragstar, this is my first bike and it would be very helpfull if someone could tell me the basics for cleaning my bike. the best way to describe my bike is a crome armchair (just to give you an idea of what kinda cleaning i need to be doing) i have a "buffering/polishing towle" i'v read that hosing the bike down to remove excess dirt is a good idea...am i right in thinking so? am i ok using soapy water or should i fork out and get some foam/gunge/spray? any help is much appreciated thanks

Question by dubpunkdub   |  last reply


Why won't this compile? Answered

I am going by a book to teach me C programming, and I have entered the program exactly, but my compiler says there's an error.  I know it is not an issue with the compiler/IDE because I tested it in another compiler and had the same result. Here is the code: #include #include int main (void) {     char buffer[256];     printf("Enter your name and press :\n");     fgets( buffer );     printf("\nYour name has %d characters and spaces!", strlen(buffer));     return 0; } It says on line 8 (the one with fgets) that there are too few arguments, yet the book says it should compile correctly.  The book is Sams Teach Yourself C Programming, and it is in lesson 2 exercise 5. Thank you for any help!

Question by StarscreamClone   |  last reply


pid control helicopter?

  hello i have digital potentiometer mcp1642 wichi have pid library setvalue on arduino which varry betwwen 0-256 and give resistance from 0-5k  and i connected it to remote control which has 400-4.2k ohm on manual resistance which 400 is max throttle and 4.2k is off motor and i have sonar sensore ez0 on helicopter thatread  atlitude by resoloution of inch and send to arduino and make i used to calculate error and then make pid control i make simple code but i start to tune p but i think i should start d , can any one help me how can i start to tune this   thing and is it true my scale in code i saw that at setvalue(111) helicopter hold good in sky so i decide to make it stable point which pid go around it  ,or maybe the problem is the sonar resoloution ..g? ecode #include #include "SPI.h" // necessary library int ss=53; // using digital pin 10 for SPI slave select int f=0; char *buffer; byte x; char array[27]; int counter=0; unsigned char r; int p=0; int last; int error=0; int wew; int required ; int kpipo; int n; void setup() {   pinMode(ss, OUTPUT); // we use this for SS pin   SPI.begin(); // wake up the SPI bus.   SPI.setBitOrder(MSBFIRST);    Serial.begin(9600);   Serial1.begin(9600); } void setValue(int value) {   digitalWrite(ss, LOW);   SPI.transfer(0); // send command byte   SPI.transfer(value); // send value (0~255)   digitalWrite(ss, HIGH); } void loop() {    while (Serial1.available()) {    x= Serial1.readBytes(buffer,1);    if(*buffer==0x52){    x= Serial1.readBytes(buffer,1);    array[0]=*buffer;    x= Serial1.readBytes(buffer,1);    array[1]=*buffer;    x= Serial1.readBytes(buffer,1);    array[2]=*buffer;    int Final_inch=(array[0]-48)*100 + (array[1]-48)*10 +(array[2]-48) ;   float Final_cm=Final_inch*2.54; //Serial.print(Final_inch); //Serial.println(" Inch "); if (f==0){ //Serial.println(" ana hoon ");   setValue(35);    } required = 50; error = required-Final_inch; Serial.print(error); Serial.println(" ana hoon "); p=abs(error); if(Final_inch == 21){    f=1;}    if(Final_inch == 22){    f=1;}    if(Final_inch == 23){   f=1;}      if(f==1){    Serial.println(" ana hnak "); if(error >0){     setValue(111-(error));}     if(error <0){     setValue(111+abs(error));}     }    }    } }

Question by britich   |  last reply


I need a circuit that 'buffers' voltage applied to an electric motor to slow down its movements. For a record player.

I'm looking to build a circuit that slows the voltage spike sent to an electric motor. Something that would progressively apply power and progressively power down.It's for a linear turntable. The tone-arm is belt-driven by an electric motor. The issue is, the motor moves so suddenly that it creates an audible 'thump' in the speakers from the quick movement. Would a capacitor in parallel do this?

Question by CST10   |  last reply


Write a single assembly program that does the following:?

A. Prompts user to enter student name into a buffer and display the name in all CAPITAL letters. b. Prompts user to enter student number into a buffer and display the student number in ascending order. c. Prompts user to enter marks for lab test (15%), mid-term (15%) and assignment (15%) if overall mark is more than 20, display ‘satisfactory’. Otherwise display ‘unsatisfactory’. d. Store the result for each task in memory. please help me immediately ide 68k..i cant make the coding 

Question by ryoki   |  last reply


I have 2 rough-running, four-point, orbital, oscillating buffers that need to run smooth again.

These are heavy duty, 2-handled, 2 Amp, 3240 rpm, four-point, orbital, oscillators that were converted to professional massagers. Both of them now run really rough and I can't keep buying new ones nor can I afford to ship them back to the company for refurbishing. I assume they only need lubrication, but I can't figure out how to open them up nor does there appear to be any one around here who repairs power tools. (Rock and a hard place, eh?) Can anyone help? I have a photo, although those two black knobs do not exist on my units.

Question by NYCtherapist   |  last reply


Need help this fix arduino the error code please ?

Im still beginner in arduino and i dont have any tutor to ask for ,i put the spi and mfrc522 library already ,please help me fix this error The copy error messages Arduino: 1.8.4 (Windows 7), Board: "Arduino/Genuino Uno" sketch_sep10a_teqj:10: error: 'MIFARE_Key' in 'class MFRC522' does not name a type MFRC522::MIFARE_Key key;           ^ sketch_sep10a_teqj:13: error: array must be initialized with a brace-enclosed initializer byte keyA[6] = (0x38,0xf5,0x86,0x03,0x3c,0x2a);  //KeyA                                               ^ sketch_sep10a_teqj:21: error: 'mfrc522' does not name a type mfrc522.PCD_Init()://Init MFRC522 card ^ C:\Users\Muhammad Adli\Documents\Arduino\sketch_sep10a_teqj\sketch_sep10a_teqj.ino: In function 'void loop()': sketch_sep10a_teqj:27: error: invalid use of member function (did you forget the '()' ?)    Serial.begin = "*";                 ^ sketch_sep10a_teqj:28: error: 'class MFRC522' has no member named 'PICC_IsNewCardPresent'    if ( ! mfrc522.PICC_IsNewCardPresent()) {                   ^ sketch_sep10a_teqj:35: error: 'class MFRC522' has no member named 'PICC_ReadCardSerial'    if (! mfrc522.PICC_ReadCardSerial()                  ^ sketch_sep10a_teqj:36: error: expected ')' before '}' token }{ ^ sketch_sep10a_teqj:36: error: expected primary-expression before '}' token C:\Users\Muhammad Adli\Documents\Arduino\sketch_sep10a_teqj\sketch_sep10a_teqj.ino: At global scope: sketch_sep10a_teqj:36: error: expected unqualified-id before '{' token }{   ^ sketch_sep10a_teqj:48: error: 'Serial' does not name a type Serial.printIn(); ^ sketch_sep10a_teqj:49: error: 'Serial' does not name a type Serial.print(PROGMEM(*Card UID: *)); ^ sketch_sep10a_teqj:50: error: expected constructor, destructor, or type conversion before '(' token printHEX(mfrc522.uid.uidByte, mfrc522.uid.size);          ^ sketch_sep10a_teqj:52: error: 'Serial' does not name a type Serial.printIn(); ^ sketch_sep10a_teqj:53: error: 'Serial' does not name a type Serial.print(PROGMEM("PICC type: *")); ^ sketch_sep10a_teqj:54: error: 'PICC_Type' in 'class MFRC522' does not name a type MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);           ^ sketch_sep10a_teqj:55: error: 'Serial' does not name a type Serial.printIn(mfrc522.PICC_GetTypeName(piccType)); ^ sketch_sep10a_teqj:58: error: expected unqualified-id before 'if' if (    piccType != MFRC522::PICC_TYPE_MIFARE_MINI ^ sketch_sep10a_teqj:64: error: expected unqualified-id before 'return'              return;              ^ sketch_sep10a_teqj:68: error: 'StatusCode' in 'class MFRC522' does not name a type MFRC522::StatusCode status;           ^ sketch_sep10a_teqj:72: error: expected unqualified-id before 'for'              for (byte i = 0; i < MFRC522::MF_KEY_SIZE; i++)              ^ sketch_sep10a_teqj:72: error: 'i' does not name a type              for (byte i = 0; i < MFRC522::MF_KEY_SIZE; i++)                               ^ sketch_sep10a_teqj:72: error: 'i' does not name a type              for (byte i = 0; i < MFRC522::MF_KEY_SIZE; i++)                                                         ^ sketch_sep10a_teqj:78: error: 'Serial' does not name a type Serial.print (PROGMEM("Authenticating with key A...: )"); ^ sketch_sep10a_teqj:79: error: 'status' does not name a type                status = (MFRC522::StatusCode) mfrc522.PCD_Authenticate(MFRC522 ::                ^ sketch_sep10a_teqj:81: error: expected unqualified-id before 'if' if (status != MFRC522::STATUS_OK) { ^ sketch_sep10a_teqj:88: error: expected unqualified-id before 'else' else ^ sketch_sep10a_teqj:92: error: 'Serial' does not name a type    Serial.print(PROGMEM("Reading data from block "));    ^ sketch_sep10a_teqj:93: error: 'Serial' does not name a type    Serial.printIn(blockNoStaff);    ^ sketch_sep10a_teqj:94: error: 'status' does not name a type    status = (MFRC522::StatusCode) mfrc522.MIFARE_Read(blockNoStaff, buffer, &size;);    ^ sketch_sep10a_teqj:95: error: expected unqualified-id before 'if'    if (status != MFRC522::STATUS_OK) {    ^ sketch_sep10a_teqj:100: error: expected unqualified-id before 'for' for (byte i = 0; i <= 15; i++) { ^ sketch_sep10a_teqj:100: error: 'i' does not name a type for (byte i = 0; i <= 15; i++) {                   ^ sketch_sep10a_teqj:100: error: 'i' does not name a type for (byte i = 0; i <= 15; i++) {                            ^ sketch_sep10a_teqj:106: error: 'Serial' does not name a type Serial.print(PROGMEM("Raw Data in block")); ^ sketch_sep10a_teqj:107: error: 'Serial' does not name a type Serial.print(blockNoStaff); ^ sketch_sep10a_teqj:108: error: 'Serial' does not name a type Serial.printIn(PROGMEM(":")); ^ sketch_sep10a_teqj:109: error: expected constructor, destructor, or type conversion before '(' token printHex(buffer, 16);          ^ sketch_sep10a_teqj:112: error: expected constructor, destructor, or type conversion before '(' token decode(byte_serial, byte_nostaf, byte_key);        ^ sketch_sep10a_teqj:113: error: 'Serial' does not name a type Serial.printIn(" "); ^ sketch_sep10a_teqj:114: error: 'Serial' does not name a type Serial.printIn("No Staf after decode: "); ^ sketch_sep10a_teqj:115: error: expected constructor, destructor, or type conversion before '(' token printIn(byte_nostaf, 10);         ^ sketch_sep10a_teqj:125: error: 'mfrc522' does not name a type mfrc522.PICC_HaltA(); ^ sketch_sep10a_teqj:127: error: 'mfrc522' does not name a type mfrc522.PCD_StopCryptol(); ^ sketch_sep10a_teqj:128: error: expected declaration before '}' token } ^ exit status 1 'MIFARE_Key' in 'class MFRC522' does not name a type This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. THIS the code: #include #include #define  RST_PIN     9   // MFRC Reset Pin #define  SS_PIN      10  // MFRC SPI Pin MFRC522 mfrc522(SS_PIN, RST_PIN); //Create MFRC522 instance. MFRC522::MIFARE_Key key; byte blockNoStaf = 10; byte keyA[6] = (0x38,0xf5,0x86,0x03,0x3c,0x2a);  //KeyA String nostaf; String serial; byte byte_nostaf[16]; byte byte_serial[4]; byte byte_key[4] = {0xb5,0xcf,0x60,0x71}; mfrc522.PCD_Init()://Init MFRC522 card   Serial.printIn(("Sedia untuk imbas kad staffUSM"));   // put your setup code here, to run once:   void loop() {   Serial.begin = "*";   if ( ! mfrc522.PICC_IsNewCardPresent()) {     //TODO: RED LED ON indicate error     //TODO: Display error at LCD Display     return;   }   // 2 Select one of the cards   if (! mfrc522.PICC_ReadCardSerial() }{ //TODO: RED LED ON indicate error //TODO: Display error at LCD Display return; //get the card UID for (byte i = 0; i < mfrc522.uid.size; i++)(       Serial += String(mfrc522.uid.uidByte[i], HEX);       byte-Serial[i] = mfrc522.uid.uidByte[i];   } // 3 show some detail of the PICC (hat is: the tag /card) Serial.printIn(); Serial.print(PROGMEM(*Card UID: *)); printHEX(mfrc522.uid.uidByte, mfrc522.uid.size); Serial.printIn(); Serial.print(PROGMEM("PICC type: *")); MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak); Serial.printIn(mfrc522.PICC_GetTypeName(piccType)); //3.1 Check for compatibility if (    piccType != MFRC522::PICC_TYPE_MIFARE_MINI         &&  piccType != MFRC522::PICC_TYPE_MIFARE_IK         &&  piccType != MFRC522::PICC_TYPE_MIFARE_4K) (             Serial.printIn(PROGMEM("This sample only works with MIFARE Classic cards.*"));             //TODO: RED LED ON indicate error             //TODO: Display error at LCD Display             return; MFRC522::StatusCode status; byte buffer[18]; byte size = sizeof(buffer);             for (byte i = 0; i < MFRC522::MF_KEY_SIZE; i++)             key.keyByte[i] = keyA[i]; // 4 Authenticate using key A Serial.print (PROGMEM("Authenticating with key A...: )");               status = (MFRC522::StatusCode) mfrc522.PCD_Authenticate(MFRC522 ::                        PICC_CMD_MF_AUTH_KEY_A, blockNoStaff, &key;, &(mfrc522.uid)); if (status != MFRC522::STATUS_OK) { Serial.print (PROGMEM("PCD_Authenticate() failed: "));   Serial.printIn(mfrc522.GetStatusCodeName(status));   //TODO: RED LED for error   //TODO: Display Error on LCD   return; } else   Serial.printIn("success");   //  5 Read data from the block   Serial.print(PROGMEM("Reading data from block "));   Serial.printIn(blockNoStaff);   status = (MFRC522::StatusCode) mfrc522.MIFARE_Read(blockNoStaff, buffer, &size;);   if (status != MFRC522::STATUS_OK) {   Serial.print(PROGMEM("MIFARE_Read()"" failed "));     Serial.printIn(mfrc522.GetStatusCodeName(status));   } for (byte i = 0; i <= 15; i++) { nostaf += String(buffer[i], HEX);   byte_nostaf[i] = buffer[i]; } Serial.print(PROGMEM("Raw Data in block")); Serial.print(blockNoStaff); Serial.printIn(PROGMEM(":")); printHex(buffer, 16); // 5 decode data dalam kad decode(byte_serial, byte_nostaf, byte_key); Serial.printIn(" "); Serial.printIn("No Staf after decode: "); printIn(byte_nostaf, 10); // 6 hantar nostaf ke frapi guna ethernet modul // 7 papar result // LED Hijau success // LED Merah failed // Papar result pada LCD // Halt PICC mfrc522.PICC_HaltA(); // Stop encryption on PCD mfrc522.PCD_StopCryptol(); } void printHex(byte *buffer, byte buffersize) for (byte i = 0; i < buffersize; i++;) { Serial.print(buffer[i] < 0 * 10 ? " 0 " : " ");   Serial.print(buffer[i], HEX); } } void printDec(byte *buffer, byte bufferSize) {   for (byte i = 0; i < bufferSize; i++;) {     //  Serial.print(buffer[i] < 0*10 ? " 0 " : " ");     Serial.print(buffer[i], DEC);   } } void printBin(byte *buffer, byte bufferSize) {   for (byte i = 0; i < bufferSize; i++) {     Serial.print(buffer[i], BIN); Serial.print(" ");   } } void printIn(byte *buffer, byte bufferSize) {   for (byte i = 0; i < bufferSize; i++) {     Serial.write(buffer[i]); Serial.print(" ");   } } void decode (byte *serial, byte *nostaf, byte *key) {   int j = 0;   for (int i = 0; i <= 15; i++) {     j = i % 4;     int a = serial[j] ^ key[j];     nostaf[i] = a ^ nostaf[i];   } }

Question by rosedgonzo   |  last reply


Can someone tell me how to use MC33035?

I need a simple bldc driver, and i found MC33035 chip. In the datasheet there are some things that I don't understand. Can you give me an ACURATE schematic how to use it for hss motors or cd motors. Atleast help me with "output buffers" in Representative Schematic Diagram. Pease.this is datasheet

Question by ZxxxY   |  last reply


Blue tooth, extra values

When using HC-05 and a bluetooth App to transmit a string like “hello” to an Arduino, I get the reading as * 12|99|99|hello# Any reason why I am getting those initial values before the string hello? How is this extra values getting into the buffer? The code is while (Serial.available()) { char inChar = Serial.read(); inputString += inChar; } Serial.println (inputString); inputString=””;

Topic by zigblue   |  last reply


If I have wind none stop can I use 100f caps instead of SLA in between my load? Answered

People with petal generator seems to able to use Caps somereason instead of SLAs, is it possible for a wind gen to do the same? use 10f caps as a buffer between loads.. also can I use AA battery bank to power an inverter (300ma 12v)

Question by celalboz   |  last reply


script error when trying to view Contest Rules

I wanted to see the rules for the GREEN contest, and the site returned this message 3 times: java.lang.IllegalStateException: forward() not allowed after buffer has committed.  at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:139)  at com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherImpl.java:113)  at com.caucho.server.webapp.ErrorPageManager.sendServletError(ErrorPageManager.java:362)  at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175)  at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)  at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)  at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)  at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:527)  at com.caucho.util.ThreadPool.run(ThreadPool.java:449)  at java.lang.Thread.run(Thread.java:595)

Topic by MargueritaM   |  last reply


fluctuating temperature control? Answered

Hello.. pls manage with me as i am weak in english.. the controller i am discussing below is theoretical and the values i am using is completely ideal and not getting into complete circuit detail but focusing on just the function of them.. suppose i build a simple temperature controller which would just work as a simple on/off switch using any temperature sensor attached to a buffer circuit... a relay is connected to the buffer and the relay performs the switching action at a temperature set by a potentiometer in the sensor circuit.. suppose a fan is switched on when temperature reaches 60degree celcius and the place starts cooling down to 59.9 (+/- some percent) d celcius...the sensor sees the change and switches off the fan even at .1 degree change...and when the temp rise by .1d it would switch on again...(just my theory..not sure) question: how to make the fan be switched on until the temp drops till 55d celcius(or any other value)? (or some time gap like 15mins)? thanks for bearing my long question but i wanted to clear myself... as i am a little new in electronics and want to start by making such simple things thanks

Question by hussainb   |  last reply


My Scholarship Idea.

My immediate thought for a use for the I-Robot was sticking with it's original intent of a "floor" tool. So it was to add a sander to it for finishing floors or even a buffer. As my idea percolated I thought with it programmable you could have it sand plywood sheets, tabletops, counters.... Then why not add a routing device instead and make a crude CNC/engraver. So that would be my project. Don't know if it could be done, or if I'm the one to do it, but I'd sure give it the old college try...

Topic by curve12 


VLC Vulnerable to Hijacking

For those who use VLC media player, I recommend reading this article. For those who don't know what VLC Media Player is, it is a widely used media player which supports many of the codecs that other common media players do not support. Source: http://www.pcworld.com/article/id,143542/article.htmlA flaw in the widely-used open-source VLC media player could allow an attacker to execute harmful code on a PC.The problem stems from a buffer overflow that can occur when the player processes subtitle files used for movies, according to a security advisory.The vulnerability existed before VLC was upgraded to version 0.8.6e in late February, but the bug appears to have escaped the last round of patches, wrote Luigi Auriemma in a note."The funny thing is that my old proof-of-concept was built just to test this specific buffer overflow, and in fact it works on the new VLC version too without modifications," Auriemma wrote.Video files can contain a link to a separate subtitle file, which VLC automatically loads when it plays the video. An attacker could use the buffer overflow flaw in VLC to execute malicious code contained in a subtitle file, and thus tamper with a PC. The flaw affects VLC players running on Windows, Mac, BSD and possibly more operating systems, Auriemma wrote.The VLC media player is part of the VideoLAN project. The player is free, and it is released under the GNU General Public License. VLC can also be used as a streaming media server for a variety of platforms. Courtesy of: http://www.searchsecurity.com.au/topics/article.asp?DocID=1237777The flaws affect VideoLAN VLC versions 0.7.0 through 0.8.6. Users can fix the issue by upgrading to VLC version 0.8.6a or by applying the patch.Another solution from Torrent Freak: For now, the only solutions are not to run any subtitle files, or to grab one of the nightly builds. The downside is, however, that these might not be as stable as the regular releases.

Topic by Brennn10   |  last reply


Neodymium Magnets? Answered

I have a motor out of an waxer/buffer and I was wondering what improvements neodymium magnets would be.  I have a couple plans for this motor, the first being for a temporary ball mill, and the second for a generator.  I am pretty sure the neodymium would be good for a generator, but what about a motor.  I am also wondering what magnets to get.  Should the north pole be the outside, south pole be the outside, should it be magnetized thru circumference, magnetized through thickness, or south on one side and north on the other.

Question by jj.inc   |  last reply


Removing car vinyl decal glue

I got a used car from the local electric company's auction and for a long time I didn't care about the glue left on the door.  But I have an idea for a custom paintjob that I would like to do but the residue from the very poorly removed company vinyls is in the way.  I tried to use goo-b-gone but it barely worked at all, even when I was using a buffer to simulate extra elbow grease.  Are there any other ways to get the stuff off short of removing the paint?

Topic by finfan7   |  last reply


Error when trying to reach persona page

Following error, when trying to reach persona page (https://www.instructables.com/you/settings?modify=PERSONA)500 Servlet Exceptionjava.lang.IllegalStateException: forward() not allowed after buffer hascommitted. at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:139) at com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherImpl.java:113) at com.caucho.server.webapp.ErrorPageManager.sendServletError(ErrorPageManager.java:362) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511) at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520) at com.caucho.util.ThreadPool.run(ThreadPool.java:442) at java.lang.Thread.run(Thread.java:595)Resin Professional 3.0.23 (built Mon, 22 Jan 2007 02:25:17 PST)

Topic by wiren   |  last reply


what do i do with 420 meters of adss optical fiber cable

I have recently purchased 420 meters of ADSS fiber cable from a local utility company. Why you ask? Cause it was cheap. It was manufactured in 2008 by Alcoa Fujikura.  Here are the specs that I have .701" diameter 144ct fiber Single mode 8 buffer tubes 18 fibers per tube Does anyone have any suggestions for what I should do with it? Or just any ideas on who's hands it should end up in?  Any help would be greatly appreciated 

Topic by idontknownothin 


How to send internet packets between two arduinos?

For a project I am working on i am wondering if there is a way to send internet packets between two arduinos. The set up would be to have both arduinos have ethernet shields. One shield is connected to a computer and the other to a router or other internet connection. The arduuinos need to communicate to each other relaying the packets of information between each using for the prototype just wires connected to the digital input and output pins. Also it would be great to have a way to have the arduinos buffer the packets. Any help would be greatly appreciated.

Question by spaceman12   |  last reply


Add simple tone control problem Answered

Hello , i have a problem when im making my portable amp.I use the little MK2 schematic , but i want to add a simple tone control , then i place the tone control between buffer output and power amp.But the problem is noise.When i turn down all knobs (treble,mid,bass) the noise decrease but still noticeable.When i turn up the Treble knoble the noise is very loud .I dont know why and how to fix it.Please help! Thanks very much ! sorry for my bad English.

Question by login721   |  last reply


I can't connect to my Etherten is something wrong with the code or the browser?

The code compiles in arduino 1.0 and uploads but when i connect to it through my browsers(firefox and internet explorer) it says internet exploerer cannot display the webpage and on firefox its just blank. here is the code #include #include byte mac[] = {   0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; byte ip[] = {   192,168,2, 77 }; EthernetServer server(80); int LED = 15;//Analog pin 5 (yes it works as a digital pin too) void setup() {   Ethernet.begin(mac, ip);   server.begin();   pinMode(LED, OUTPUT); } #define BUFSIZ 100    //Buffer size for getting data char clientline[BUFSIZ];  //string that will contain command data int index = 0;  //clientline index void loop() {   index=0;  //reset the clientline index   EthernetClient client = server.available();   if (client) {     boolean currentLineIsBlank = true;     while (client.connected()) {       if (client.available()) {         char c = client.read();         if(index         {           clientline[index]=c;           index++;         }         if (c == '\n' && currentLineIsBlank)         {           client.println("HTTP/1.1 200 OK");           client.println("Content-Type: text/html");           client.println();           client.println("Arduino Home AutomationRelay1 OnRelay1 Off");          break;         }         if (c == '\n') {           currentLineIsBlank = true;         }         else if (c != '\r') {           currentLineIsBlank = false;         }         if(strstr(clientline,"/?L1=1")!=0) {  //look for the command to turn the led on.           digitalWrite(LED, 1);  //turn the led on         } else if(strstr(clientline,"/?L1=0")!=0) {  //look for command to turn led off.           digitalWrite(LED, 0);  //turn led off         }             delay(1);     client.stop();       }     }   } } Thanks in advance

Question by PoisonMondo   |  last reply


Feature Request: Could &quot;Answers&quot; include a JFGI-style sanity check?

There are a not-so surprising number of Questions which are trivial search queries, but the author (often Guest) doesn't realize that there's an I'bles search interface (as limited as it is). Would it be possible to add a buffer layer between the user typing their question and having posted? I'm imagining something like running the question through "search I'bles" and "search forum topics", and providing a very brief (i.e., text lines rather than giant icons) list of the top half-dozen results, with a statement like, "Do any of these Instructables answer your question?" Otherwise, someone like me or Nacho are going to be playing that role, and we will become less and less polite about it over time :-)

Topic by kelseymh   |  last reply


Do I need to invert phase a second time? Answered

I'm building a guitar pedal and I am inverting phase with the initial buffer (TL072). I am then splitting the signal into two parts, dry (no effect) and wet (effect). Each of these will be output as separate channels (left and right) and not mixed back to mono. I plan to send each channel through its own 386 amplifier chip to boost it to a level suitable for headphones. So, what I am wondering, is, should I use the 386 to invert the phase a second time back to normal? Or should I use an op amp at unity gain to do that before I send it to the 386? Or does it not matter if I am not mixing the two signals back to mono?

Question by randofo   |  last reply


How do I install LED light strips in my guitar with an on/on/off switch where one on responds to the picking?

Ok so basically what I want to do is install LED light strips into my guitar with an on/on/off switch so one 'on' is where the LEDs are always on, and in the other they respond to picking. What I mean by that is that they light up only when the guitar is strummed, and the brightness depends on the picking intensity. I was thinking for the always on I could wire a 9v battery directly to the LEDs, and for the one where they respond to picking wire it like this: pickups-->voltage buffer-->amplifier-->rectifier-->LEDs Would that work? If not how would I do this?

Question by solomon684   |  last reply


16x16 LED panel direct control

Hi all, I got 10 LED panels of 16x16 LEDs each. Now I want to create a big modular display system with these and I'm also planning to post this on the instrucatbles website once I succeed. But I have some problems getting started. I spent alot of time reading all LED matrix related topics on the website here but none of the designs matches the fixed design I have on those panels. Instead of using some sort of multiplexing, 32 shift registers are used for 256 LEDs which means every LED has it's own shift register output. Put then again, I also find 3 buffer ICs on the panels and I have no idea where they are used for... Below the info I have now: 1 PANEL: - 16x16 yellow LEDs - 32x M74HC4094B1 8-bit shift registers - 3x 74HC125N Quad buffer/line register, 3 state Pictures: http://www.myalbum.com/Album=64MKOUJR First I want to work with only 1 panel and be able to control this by putting images on it. But for this I have to understand completely how the hardware is built up so I first want to create the schematic of 1 panel. Can somebody help me with this and get me started on the project? First goal: just control 1 panel with an AVR to put some text on it and let is scroll. Final goal: be able to connect multiple panels and configure the software accordingly to the panels used. Then use a PC to put images on the screen and maybe even create a live feed (webcam capture). For this maybe an FPGA should be used to have more processing power/memory. Many thanks already in advance!

Topic by kris_ge   |  last reply


want help with schaer programmer

Hi every one i just have proplem i want any body help me to solve it 1) i build a schaer programmer with 74ls07 hex buffer and i get the power from transformer power supply i integrated in same circuit i getted from it rigth voltage 13 for vpp and 5 for vdd and i found that ic prog only support schaer programer i make hardware check on programmer and get good rating at vpp and vdd and clock and data in schaer clock and data only avalible when vdd is available i tried to program 16f628a i failed may reason vpp get after vdd ? and i also tried to program 16f684a and faied also i dont realy reason when i try to read from pic i some times get garbage data is it noise on data and clock ? is so how to remove it ? can i use this programmer with winpic800 ? if so tell me how ?

Topic by m_fathy 


gate driver for power mosfet

I am strobing columns of LEDs at high currents very quickly (100mA for each LED, for 100us) with p-channel mosfets and LED drivers. The p-channel fets that can handle that sort of current (100mA * 24 LEDs) have gate capacitances of 1000pF and up. My microcontroller can't push too much current to the gate too quickly, which would result in the mosfet losing power to slow switch (and ghosting in the LEDs). I KNOW that some sort of gate driver buffer ic exists, i just can't seem to find one. Everything I am finding is for high-voltage or high-current applications and motor-driving. I just need something that will drive my gates at 200-400mA, and since i need 9 of them, i'd like them to be cheap. I dont need any of these motor-driver ICs or 3A gate driver chips... Can anyone help me out?

Topic by samurai1200 


ITEADLIB_Arduino_WeeESP8266 android response

Im planing to do a project that using Arduino+esp8266 with android device, at first my code was something like this. #include #define DEBUG true SoftwareSerial esp8266(9,10); // make RX Arduino line is pin 2, make TX Arduino line is pin 3.                          // This means that you need to connect the TX line from the esp to the Arduino's pin 2                          // and the RX line from the esp to the Arduino's pin 3 void setup() {   Serial.begin(9600);   esp8266.begin(9600); // your esp's baud rate might be different   pinMode(11,OUTPUT);   digitalWrite(11,LOW);   pinMode(12,OUTPUT);   digitalWrite(12,LOW);   pinMode(13,OUTPUT);   digitalWrite(13,LOW);   pinMode(10,OUTPUT);   digitalWrite(10,LOW);   sendCommand("AT+RST\r\n",2000,DEBUG); // reset module   sendCommand("AT+CWMODE=1\r\n",1000,DEBUG); // configure as access point   sendCommand("AT+CWJAP=\"Arsalan Wifi\",\"arsalan123\"\r\n",3000,DEBUG);   delay(10000);   sendCommand("AT+CIFSR\r\n",1000,DEBUG); // get ip address   sendCommand("AT+CIPMUX=1\r\n",1000,DEBUG); // configure for multiple connections   sendCommand("AT+CIPSERVER=1,8080\r\n",1000,DEBUG); // turn on server on port 80   Serial.println("Server Ready"); } void loop() {   if(esp8266.available()) // check if the esp is sending a message   {     if(esp8266.find("+IPD,"))     {      delay(1000); // wait for the serial buffer to fill up (read all the serial data)      // get the connection id so that we can then disconnect      int connectionId = esp8266.read()-48; // subtract 48 because the read() function returns                                        // the ASCII decimal value and 0 (the first decimal number) starts at 48      esp8266.find("pin="); // advance cursor to "pin="      int pinNumber = (esp8266.read()-48); // get first number i.e. if the pin 13 then the 1st number is 1      int secondNumber = (esp8266.read()-48);      if(secondNumber>=0 && secondNumber<=9)      {       pinNumber*=10;       pinNumber +=secondNumber; // get second number, i.e. if the pin number is 13 then the 2nd number is 3, then add to the first number      }      digitalWrite(pinNumber, !digitalRead(pinNumber)); // toggle pin         String content;      content = "چراغ ";      content += pinNumber;      content += " is ";      if(digitalRead(pinNumber))      {        content += "ON";      }      else      {        content += "OFF";      }      sendHTTPResponse(connectionId,content);      // make close command      String closeCommand = "AT+CIPCLOSE=";      closeCommand+=connectionId; // append connection id      closeCommand+="\r\n";      sendCommand(closeCommand,1000,DEBUG); // close connection      Serial.print(connectionID);     }   } } /* * Name: sendData * Description: Function used to send data to ESP8266. * Params: command - the data/command to send; timeout - the time to wait for a response; debug - print to Serial window?(true = yes, false = no) * Returns: The response from the esp8266 (if there is a reponse) */ String sendData(String command, const int timeout, boolean debug) {     String response = "";     int dataSize = command.length();     char data[dataSize];     command.toCharArray(data,dataSize);     esp8266.write(data,dataSize); // send the read character to the esp8266     if(debug)     {       Serial.println("\r\n====== HTTP Response From Arduino ======");       Serial.write(data,dataSize);       Serial.println("\r\n========================================");     }     long int time = millis();     while( (time+timeout) > millis())     {       while(esp8266.available())       {         // The esp has data so display its output to the serial window         char c = esp8266.read(); // read the next character.         response+=c;       }      }     if(debug)     {       Serial.print(response);     }     return response; } /* * Name: sendHTTPResponse * Description: Function that sends HTTP 200, HTML UTF-8 response */ void sendHTTPResponse(int connectionId, String content) {      // build HTTP response      String httpResponse;      String httpHeader;      // HTTP Header      httpHeader = "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\n";      httpHeader += "Content-Length: ";      httpHeader += content.length();      httpHeader += "\r\n";      httpHeader +="Connection: close\r\n\r\n";      httpResponse = httpHeader + content + " "; // There is a bug in this code: the last character of "content" is not sent, I cheated by adding this extra space      sendCIPData(connectionId,httpResponse); } /* * Name: sendCIPDATA * Description: sends a CIPSEND=, command * */ void sendCIPData(int connectionId, String data) {    String cipSend = "AT+CIPSEND=";    cipSend += connectionId;    cipSend += ",";    cipSend +=data.length();    cipSend +="\r\n";    sendCommand(cipSend,1000,DEBUG);    sendData(data,1000,DEBUG); } /* * Name: sendCommand * Description: Function used to send data to ESP8266. * Params: command - the data/command to send; timeout - the time to wait for a response; debug - print to Serial window?(true = yes, false = no) * Returns: The response from the esp8266 (if there is a reponse) */ String sendCommand(String command, const int timeout, boolean debug) {     String response = "";     esp8266.print(command); // send the read character to the esp8266     long int time = millis();     while( (time+timeout) > millis())     {       while(esp8266.available())       {         // The esp has data so display its output to the serial window         char c = esp8266.read(); // read the next character.         response+=c;       }      }     if(debug)     {       Serial.print(response);     }     return response; } but then i chose to use library code for esp8266 and i use this link ITEADLIB_Arduino_WeeESP8266 now i have problem that i dont know how can i get a response message back to my android device, also this is my code using library, (i know its really noobish code cuz im new but... it work atleast :D ) #include #include "ESP8266.h" #include #include LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //moshakhas kardane pin haye LCD SoftwareSerial mySerial(7, 8); // moshakhas kardane pin haye wifi ESP8266 wifi(mySerial); String msg; #define SSID        "Arsalan Wifi"  //UserName wifi #define PASSWORD    "arsalan123"  //Password wifi String pinnum; int count= 0; void setup() {   lcd.begin(20, 4);       Serial.begin(9600);   pinMode(9,OUTPUT);   digitalWrite(9,HIGH);   String IP;   Serial.print("setup begin\r\n");   lcd.print("Connecting to Wifi");   delay(3000);   Serial.print("FW Version: ");   //  Serial.println(wifi.getVersion().c_str());         if (wifi.setOprToStation()) {         Serial.print("to station ok\r\n");     } else {         Serial.print("to station err\r\n");     }     if (wifi.joinAP(SSID, PASSWORD)) {         Serial.print("Join AP success\r\n");         Serial.print("IP: ");               Serial.println(wifi.getLocalIP().c_str());         IP = wifi.getLocalIP().c_str();         lcd.setCursor(0, 1);         lcd.print("Join AP success");         lcd.setCursor(0, 2);         lcd.print("IP: "+IP);     } else {         Serial.print("Join AP failure\r\n");         lcd.setCursor(0, 1);         lcd.print("Join AP failure");         lcd.setCursor(0, 2);         lcd.print("Contact Administrator");     }      if (wifi.enableMUX()) {         Serial.print("multiple ok\r\n");     } else {         Serial.print("multiple err\r\n");     }     if (wifi.startTCPServer(80)) {         Serial.print("start tcp server ok\r\n");         lcd.setCursor(0, 3);         lcd.print("Server Ready");     } else {         Serial.print("start tcp server err\r\n");         lcd.setCursor(0, 3);         lcd.print("Server Setup Fail");     }     if (wifi.setTCPServerTimeout(10)) {         Serial.print("set tcp server timout 10 seconds\r\n");     } else {         Serial.print("set tcp server timout err\r\n");     }           Serial.print("setup end\r\n"); } void loop() {    uint8_t buffer[128] = {0};     uint8_t mux_id;     uint32_t len = wifi.recv(&mux;_id, buffer, sizeof(buffer), 100);     if (len > 0) {         Serial.print("Status:[");         Serial.print(wifi.getIPStatus().c_str());         Serial.println("]");                 Serial.print("Received from :");         Serial.print(mux_id);         Serial.print("[");         for(uint32_t i = 0; i < len; i++) {             Serial.print((char)buffer[i]);             msg = "";             msg += ((char)buffer[i]);                         if (msg == "p")             {               count=1;                                         }                          if (msg != "p" & count ==1)             {               if(msg =="i")               {                                 count++;               }               else               {                                 count = 0;               }             }             if (msg !="i" & count ==2)             {               if (msg =="n")               {                 count++;               }               else               {                 count = 0;               }             }             if (msg !="n" & count ==3)             {               if(msg=="=")               {                 count++;                               }               else               {                 count = 0;               }             }             if (msg != "=" & count==4)             {               Serial.print(msg);               pinnum =msg;               count = 0;             }                     }         Serial.print(pinnum);         Serial.print("]\r\n");         int pin = pinnum.toInt();         Serial.print(pin);         digitalWrite(pin, !digitalRead(pin)); // toggle pin            String content;      content = "چراغ ";      content += pinnum;      content += " is ";           if(digitalRead(pin))      {        content += "ON";      }      else      {        content += "OFF";      }                 if(wifi.send(mux_id, buffer, len)) {             Serial.print("send back ok\r\n");         } else {             Serial.print("send back err\r\n");         }                 if (wifi.releaseTCP(mux_id)) {             Serial.print("release tcp ");             Serial.print(mux_id);             Serial.println(" ok");         } else {             Serial.print("release tcp");             Serial.print(mux_id);             Serial.println(" err");         }                 Serial.print("Status:[");         Serial.print(wifi.getIPStatus().c_str());         Serial.println("]");     }   }

Question by Arsalan Ahmadi   |  last reply


LM1857T circuit help? Answered

I have been wanting to build a good amp for a while now and i just got a LM1875T. so i put together this circuit diagram: http://imgur.com/ov3Ikd6 also i am running the audio signal thru an LM386 as a pre-amp/buffer before it hits this. i am using a speaker rated  at "4ohm 80W" and i am using a 30V 2A power supply. my questions: #1 the circuit does not run at all if R2 (22k between pin 1 and ground) is there so i removed it for testing. why is it there if it keeps circuit from working? #2 C8 (100uf capacitor between pin 3 and ground) is reversed? i thought it might have been a typo on the Texas instruments site so i put it normally. nothing happened. so i put it the way they showed it and it worked! but my cap blew 5 min later... (i used a 50v 100uf) so i replaced it with a 200V 147uf capacitor. it started heating up after 1 minute so i disconnected it to come ask. should i use a tantalum 50V capacitor?

Question by TK175672   |  last reply


How I had a computer turn on automatically when the BIOS did not support It

So, I just got a Kindle and want to automate the downloading of news feeds to it. I wanted a PC to turn on when I woke up in the morning, download the feeds, transfer them to my Kindle, then shut off. First problem: The spare PC I put together for this does not support automatic startup in the BIOS, and neither do any of the other motherboards I had. So, I thought of a way to use an alarm clock to turn it on. When the alarm clock would go off, it had a speaker that would produce a tone. This means it was switching power to the speaker on and off very quickly. This would not drive a relay directly, so I made a "filtering" circuit consisting of a few transistors and a capacitor. When the clock goes off, it charges the capacitor with a transistor. This buffers the on's and off's into a kind of pulsating DC current into the cap. The capacitor drains into another transistor, turning it on. This activates two relays at once. One presses the button to turn off the alarm, and the other turns on the computer. Since the alarm was turned off just a moment ago, the speaker does not sound again and it does not turn the computer back off. In the first picture, you see two sets of black and white wires going into the PC. One comes from the relay to short the power switch momentarily, and the other goes to the +5VSB on the power supply. This line provides +5v at low currents, even when the computer is off. The 5v powers the buffering circuit. That was the difficult part and took about 4 hours. Everything else was easy. When you get a Kindle, Amazon gives you a free email address you can use to send files to it. I installed Calibre (an awesome free e-book manager) on the PC and had it run on startup. I set it up to download the feeds then email them to the Kindle through WiFi. Turning the computer back off was easy as well. All you need to do it make a shortcut to "shutdown.exe -f -s -t x" and add it to the startup folder. The .exe is the Windows shutdown program. -f force-closes any open programs, -s specifies a shutdown (instead of restart, logout, etc) and -t x is how much time it will wait before shutting down, in seconds. I set it to a half-hour. So, now I can have my news feeds on my Kindle before I leave for school. :D Funny thing is, the whole alarm clock bit could have been avoided if I wasn't too lazy to just press the power switch when I woke up in the morning! XD

Topic by 1up   |  last reply


IP-phonet on Promotron

• Support SIP 2.0, TCP/UDP/IP, RTP/RTCP, HTTP, HTTPS, ICMP, ARP, DHCP, NTP/SNTP, TFTP protocols.• Support STUN and symmetric RTP for NAT.• Interoperable with various 3rd party SIP end user device, Proxy/Registrar Server, and gateway products.• Advanced 32bit embed MCU + DSP technology to ensure superior audio quality.• Advanced adaptive jitter buffer control, packet delay and loss concealment technology.• Support popular vocoders including G.723, G.729A, G.711(a-law and u-law), G.726(40K/32K/24K/16K).• Support standard voice feature such as Caller ID Display, Call Waiting, Hold, Transfer, in-band and out-of-band DTMF,three way conference.• Support Silence Suppression, VAD(Voice Activity Detection), CNG(Comfort Noise Generation), Line Echo Cancellation(G.168), and AGC(Automatic Gain Control)• PSTN pass through port, with auto switch between PSTN and VOIP on inbound call and manual switch on outbound call. It becomes PSTN phone when unit power is off.Linkman:EricaSkype: erica888wQQ: 541006495MSN: w888160@hotmail.comTel: +86-755-22015114, 27918959, 26626155 LEAD TECHNOLOG DEVELOPMENT CO., LTDWeb:www.elecic.com

Topic by cobbyzhou   |  last reply


Ruby amp 9v DIY guitar amp

The Ruby amp (by Runoffgroove.com) is quite simply the best 9v guitar amp on the planet. Ruby has many shades of sparkly clean all the way up to a great, natural overdrive. Because of its small size and low power consumption its perfect for building your own cigar box amp or mounting into a guitar pedal enclosure. If you have never done a diy electronics project then this is a great way to get started.  The kit comes all the parts you need  - pcb, resistors, caps, jacks, led, 9v battery snap and instruction sheet. Also I have added a couple of parts that you never seem to get included in commercial kits - a toggle switch and a dc jack (so you can run off a wallwart). Its fun, educational and at the end of the buid you have a real great sounding amp that can be used for busking, practicing in the park or for homerecording with a microphone. There are plenty of small output LM386 kits out there - only the Ruby is a real guitar amp as it has a jfet input buffer and a real gain control - oh and thers mods that can be done :) check it out at www.rubyamp.com - heaps of videos and sound samples cheers

Topic by dogbox2012   |  last reply


Robot Pegasus design possible? Answered

Ok, so I have another idea that will most likely never get anywhere due to my lack of funds/it not being possible.           What if I made a magnetic track somewhat like a maglev and had a robotic pegasus with electromagnets in its feet. It would also be an ornithopter to get it farther than a few inches off the ground. I would have the magnetic track to have it hover a few inches off the ground for about a minute before and after takeoff to make it less likely to crash on landing and give a minute to text the mayor to not worry about any upcoming pegasus sightings above or around town before taking off.           What kind of horsepower engine would I need to power the wings enough to get sufficient lift (at least 15-20 feet)? And would the electromagnet buffer before landing be significant enough to at least lessen the impact so it doesn't maim/kill you if you crash?           The electromagnets don't seem to me like they would work, but it would still be fun just to hover it to show it off without flying up 20-30 feet and worry about falling. Also, would it make it too heavy to fly if I put in an extra motor to make it walk/run so it doesn't have to be flying to move? I don't really expect this to be within my budget, but it would still be cool.

Question by ALogan97   |  last reply


Controlling a motor with a touch screen ?

So i am trying to control a motors speed using PWM (running through a transistor). I know how to make that happen but i am unsure how to use a touch screen to control the motor,  I have one of the test codes that is a touch pad 0-9 with enter and clear. I was wondering if there was a way that i can punch the number in push enter and have the motor run at that speed(starting with just 0-255) The touch screen is 3.2LCD TFT Touch Screen SD Reader http://www.ebay.com/itm/SainSmart-Mega2560-3-2-TFT-LCD-Shield-Touch-Screen-SD-Reader-4-Arduino-2560-/280930557613?pt=LH_DefaultDomain_0&hash;=item4168c41ead The code is // ITDB02_Touch_ButtonTest (C)2010 Henning Karlsen // web: http://www.henningkarlsen.com/electronics // Modified to work with UTFT on Mega w/Arduino 1.0.1 (C)2012 Otmar Ebenhoech, // // This program is a quick demo of how create and use buttons. // // This program requires the ITDB02_Graph library (8bit mode) // or ITDB02_Graph16 (16bit mode). // // It is assumed that the ITDB02 module is connected to a // ITDB02 Shield, a ITDB02 Mega Shield or that you know how // to change the pin numbers in the setup. // #include #include // Declare which fonts we will be using extern uint8_t BigFont[]; // Uncomment the next line for Arduino 2009/Uno //UTFT myGLCD(ITDB32S,19,18,17,16);   // Remember to change the model parameter to suit your display module! //ITDB02_Touch  myTouch(15,10,14,9,8); // Uncomment the next line for Arduino Mega UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module! ITDB02_Touch  myTouch(6,5,4,3,2); //// //// ////   ////THIUS IS WHAT I ADDED ETK int motor = 9; ////    //// //// //// int x, y; char stCurrent[20]=""; int stCurrentLen=0; char stLast[20]=""; void setup() {//// //// //// //// tHIS IS WHAT I ADDED ETK pinMode (motor, OUTPUT); //// ////   ////    //// // Initial setup   myGLCD.InitLCD(LANDSCAPE);   myGLCD.clrScr();   myTouch.InitTouch(LANDSCAPE);   myTouch.setPrecision(PREC_MEDIUM);   myGLCD.setFont(BigFont);   myGLCD.setBackColor(0, 0, 255);   // Draw the upper row of buttons   for (x=0; x<5; x++)   {     myGLCD.setColor(0, 0, 255);     myGLCD.fillRoundRect (10+(x*60), 10, 60+(x*60), 60);     myGLCD.setColor(255, 255, 255);     myGLCD.drawRoundRect (10+(x*60), 10, 60+(x*60), 60);     myGLCD.printNumI(x+1, 27+(x*60), 27);   } // Draw the center row of buttons   for (x=0; x<5; x++)   {     myGLCD.setColor(0, 0, 255);     myGLCD.fillRoundRect (10+(x*60), 70, 60+(x*60), 120);     myGLCD.setColor(255, 255, 255);     myGLCD.drawRoundRect (10+(x*60), 70, 60+(x*60), 120);     if (x<4)       myGLCD.printNumI(x+6, 27+(x*60), 87);   }   myGLCD.print("0", 267, 87); // Draw the lower row of buttons   myGLCD.setColor(0, 0, 255);   myGLCD.fillRoundRect (10, 130, 150, 180);   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (10, 130, 150, 180);   myGLCD.print("Clear", 40, 147);   myGLCD.setColor(0, 0, 255);   myGLCD.fillRoundRect (160, 130, 300, 180);   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (160, 130, 300, 180);   myGLCD.print("Enter", 190, 147);   myGLCD.setBackColor (0, 0, 0); } void updateStr(int val) {   if (stCurrentLen<20)   {     stCurrent[stCurrentLen]=val;     stCurrent[stCurrentLen+1]='\0';     stCurrentLen++;     myGLCD.setColor(0, 255, 0);     myGLCD.print(stCurrent, LEFT, 224);   }   else   {     myGLCD.setColor(255, 0, 0);     myGLCD.print("BUFFER FULL!", CENTER, 192);     delay(500);     myGLCD.print("            ", CENTER, 192);     delay(500);     myGLCD.print("BUFFER FULL!", CENTER, 192);     delay(500);     myGLCD.print("            ", CENTER, 192);     myGLCD.setColor(0, 255, 0);   } } // Draw a red frame while a button is touched void waitForIt(int x1, int y1, int x2, int y2) {   myGLCD.setColor(255, 0, 0);   myGLCD.drawRoundRect (x1, y1, x2, y2);   while (myTouch.dataAvailable())     myTouch.read();   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (x1, y1, x2, y2); } void loop() {   while (true)   {     if (myTouch.dataAvailable())     {       myTouch.read();       x=myTouch.getX();       y=myTouch.getY();             if ((y>=10) && (y<=60))  // Upper row       {         if ((x>=10) && (x<=60))  // Button: 1         {           waitForIt(10, 10, 60, 60);           updateStr('1');         }         if ((x>=70) && (x<=120))  // Button: 2         {           waitForIt(70, 10, 120, 60);           updateStr('2');         }         if ((x>=130) && (x<=180))  // Button: 3         {           waitForIt(130, 10, 180, 60);           updateStr('3');         }         if ((x>=190) && (x<=240))  // Button: 4         {           waitForIt(190, 10, 240, 60);           updateStr('4');         }         if ((x>=250) && (x<=300))  // Button: 5         {           waitForIt(250, 10, 300, 60);           updateStr('5');         }       }       if ((y>=70) && (y<=120))  // Center row       {         if ((x>=10) && (x<=60))  // Button: 6         {           waitForIt(10, 70, 60, 120);           updateStr('6');         }         if ((x>=70) && (x<=120))  // Button: 7         {           waitForIt(70, 70, 120, 120);           updateStr('7');         }         if ((x>=130) && (x<=180))  // Button: 8         {           waitForIt(130, 70, 180, 120);           updateStr('8');         }         if ((x>=190) && (x<=240))  // Button: 9         {           waitForIt(190, 70, 240, 120);           updateStr('9');         }         if ((x>=250) && (x<=300))  // Button: 0         {           waitForIt(250, 70, 300, 120);           updateStr('0');         }       }       if ((y>=130) && (y<=180))  // Upper row       {         if ((x>=10) && (x<=150))  // Button: Clear         {           waitForIt(10, 130, 150, 180);           stCurrent[0]='\0';           stCurrentLen=0;           myGLCD.setColor(0, 0, 0);           myGLCD.fillRect(0, 224, 319, 239);         }         if ((x>=160) && (x<=300))  // Button: Enter         {           waitForIt(160, 130, 300, 180);           if (stCurrentLen>0)           {          for (x=0; x             {               stLast[x]=stCurrent[x];             }             stCurrent[0]='\0';             stCurrentLen=0;             myGLCD.setColor(0, 0, 0);             myGLCD.fillRect(0, 208, 319, 239);             myGLCD.setColor(0, 255, 0);             myGLCD.print(stLast, LEFT, 208);             ////             ////              ////             ////THIS IS WAHT I ADDED ETK             analogWrite(motor,stLast);             ////             ////              ////             ////           }           else           {             myGLCD.setColor(255, 0, 0);             myGLCD.print("BUFFER EMPTY", CENTER, 192);             delay(500);             myGLCD.print("            ", CENTER, 192);             delay(500);             myGLCD.print("BUFFER EMPTY", CENTER, 192);             delay(500);             myGLCD.print("            ", CENTER, 192);             myGLCD.setColor(0, 255, 0);           }         }       }     }   } } The stuff i added has these //// on top and bottom with a comment "THIS WAS ADDED  ETK" the part that dont work is "analogWrite(motor,stLast);" and stLast is a char so it give me char to int error. And as you can tell i am no good at this so anything that can point me in the right direction would be greatly appreciated ETK

Question by etkoehn 


How to call an api with nodemcu from this wesite:http: (//davidayala.eu/current-time/)?

Http://davidayala.eu/current-time/ The website above offers free Timezone APIs. I have been trying to request the API with my esp8266 NodeMCU, but still, i get no response. Can anyone please demonstrate to me with a code sample how it's supposed to be done? I will be posting my code soon. The following is my code (In arduino IDE) for my NodeMCU #include String result; char host[]="script.google.com"; WiFiClient client; void setup() { // put your setup code here, to run once: Serial.begin(9600); WiFi.begin("Faiz", "hautepackard"); while(WiFi.status() != WL_CONNECTED){ Serial.print("."); delay(500); } Serial.println("Connected!"); Serial.println(WiFi.localIP()); } void loop() { Time(); delay(3000); } String url = "/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec"; void Time(){ if (client.connect(host, 443)) { //starts client connection, checks for connection client.print(String("GET ") + url + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" + "Connection: close\r\n\r\n"); Serial.println("Server is accessible"); } else { Serial.println("connection failed"); //error message if no client connect Serial.println(); } result = ""; while (client.available()) { //connected or data available char c = client.read(); //gets byte from ethernet buffer result = result+c; } Serial.println(result); client.stop(); //stop client Serial.println("end of function"); } And this is what i get in the Serial monitor: ........Connected! Server is accessible end of function Am i going wrong anywhere in the code? Please help this burning question.

Question by Techovator0819   |  last reply


: Arduino + Adafruit wave sheild + IR + Keypad sound board

Hi , was wondering if you could point me in the right direction I'm very new to Arduino I built last year a simple board with adafruit wave shield and added a simple 12 digit key pad to play 12 sounds + power up I have got the codes for the KEYES IR receiver so know the IR is correctly connected and library loaded im trying to integrate the IR code so can change the sounds by IR remote ideally with option of the buttons (if have to loose the buttons and just use remote that's fine) have copied the code below for how it works now just buttons   I found some code for Cylon Pumpkin that works great with just the remote but would also like to integrate the 12 digit keypad Thank you in advance for any help or pointers you can suggest Richard CODE FOR 12 DIGIT BUTTON PRESS /* ADAVOICE is an Arduino-based voice pitch changer plus WAV playback. Fun for Halloween costumes, comic convention getups and other shenanigans! Hardware requirements: - Arduino Uno, Duemilanove or Diecimila (not Mega or Leonardo compatible). - Adafruit Wave Shield - Speaker attached to Wave Shield output - Battery for portable use If using the voice pitch changer, you will also need: - Adafruit Microphone Breakout - 10K potentiometer for setting pitch (or hardcode in sketch) If using the WAV playback, you will also need: - SD card - Keypad, buttons or other sensor(s) for triggering sounds Software requirements: - WaveHC library for Arduino - Demo WAV files on FAT-formatted SD card This example sketch uses a 3x4 keypad for triggering sounds...but with some changes could be adapted to use several discrete buttons, Hall effect sensors, force-sensing resistors (FSRs), I2C keypads, etc. (or if you just want the voice effect, no buttons at all). Connections: - 3.3V to mic amp+, 1 leg of potentiometer and Arduino AREF pin - GND to mic amp-, opposite leg of potentiometer - Analog pin 0 to mic amp output - Analog pin 1 to center tap of potentiometer - Wave Shield output to speaker or amplifier - Matrix is wired to pins A2, A3, A4, A5 (rows) and 6, 7, 8 (columns) - Wave shield is assumed wired as in product tutorial Potentiometer sets playback pitch. Pitch adjustment does NOT work in realtime -- audio sampling requires 100% of the ADC. Pitch setting is read at startup (or reset) and after a WAV finishes playing. POINT SPEAKER AWAY FROM MIC to avoid feedback. Written by Adafruit industries, with portions adapted from the 'PiSpeakHC' sketch included with WaveHC library. */ #include #include SdReader card; // This object holds the information for the card FatVolume vol; // This holds the information for the partition on the card FatReader root; // This holds the information for the volumes root directory FatReader file; // This object represent the WAV file for a pi digit or period WaveHC wave; // This is the only wave (audio) object, -- we only play one at a time #define error(msg) error_P(PSTR(msg)) // Macro allows error messages in flash memory #define ADC_CHANNEL 0 // Microphone on Analog pin 0 // Wave shield DAC: digital pins 2, 3, 4, 5 #define DAC_CS_PORT PORTD #define DAC_CS PORTD2 #define DAC_CLK_PORT PORTD #define DAC_CLK PORTD3 #define DAC_DI_PORT PORTD #define DAC_DI PORTD4 #define DAC_LATCH_PORT PORTD #define DAC_LATCH PORTD5 uint16_t in = 0, out = 0, xf = 0, nSamples; // Audio sample counters uint8_t adc_save; // Default ADC mode // WaveHC didn't declare it's working buffers private or static, // so we can be sneaky and borrow the same RAM for audio sampling! extern uint8_t buffer1[PLAYBUFFLEN], // Audio sample LSB buffer2[PLAYBUFFLEN]; // Audio sample MSB #define XFADE 16 // Number of samples for cross-fade #define MAX_SAMPLES (PLAYBUFFLEN - XFADE) // Remaining available audio samples // Keypad information: uint8_t rows[] = { A2, A3, A4, A5 }, // Keypad rows connect to these pins cols[] = { 6, 7, 8, 9 }, // Keypad columns connect to these pins r = 0, // Current row being examined prev = 255, // Previous key reading (or 255 if none) count = 0; // Counter for button debouncing #define DEBOUNCE 10 // Number of iterations before button 'takes' // Keypad/WAV information. Number of elements here should match the // number of keypad rows times the number of columns, plus one: const char *sound[] = { "Crashing" , "Damaged", "InFlight" , "PowerUp" , // Row 1 = Darth Vader sounds "Brkdown3" , "Brkdown2" , "Brkdown" , "PowerUp" , // Row 2 = Godzilla sounds "Landing", "drain" , "Shutdown" , "PowerUp" , // Row 3 = Dug the dog sounds "Silent", "TakeOff", "Vortex" , "PowerUp" , // Row 4 = Cartoon/SFX sound "PowerUp" }; // Extra item = boot sound //////////////////////////////////// SETUP void setup() { uint8_t i; Serial.begin(9600); // The WaveHC library normally initializes the DAC pins...but only after // an SD card is detected and a valid file is passed. Need to init the // pins manually here so that voice FX works even without a card. pinMode(2, OUTPUT); // Chip select pinMode(3, OUTPUT); // Serial clock pinMode(4, OUTPUT); // Serial data pinMode(5, OUTPUT); // Latch digitalWrite(2, HIGH); // Set chip select high // Init SD library, show root directory. Note that errors are displayed // but NOT regarded as fatal -- the program will continue with voice FX! if(!card.init()) SerialPrint_P("Card init. failed!"); else if(!vol.init(card)) SerialPrint_P("No partition!"); else if(!root.openRoot(vol)) SerialPrint_P("Couldn't open dir"); else { PgmPrintln("Files found:"); root.ls(); // Play startup sound (last file in array). playfile(sizeof(sound) / sizeof(sound[0]) - 1); } // Optional, but may make sampling and playback a little smoother: // Disable Timer0 interrupt. This means delay(), millis() etc. won't // work. Comment this out if you really, really need those functions. TIMSK0 = 0; // Set up Analog-to-Digital converter: analogReference(EXTERNAL); // 3.3V to AREF adc_save = ADCSRA; // Save ADC setting for restore later // Set keypad rows to outputs, set to HIGH logic level: for(i=0; i pinMode(rows[i], OUTPUT); digitalWrite(rows[i], HIGH); } // Set keypad columns to inputs, enable pull-up resistors: for(i=0; i pinMode(cols[i], INPUT); digitalWrite(cols[i], HIGH); } while(wave.isplaying); // Wait for startup sound to finish... startPitchShift(); // and start the pitch-shift mode by default. } //////////////////////////////////// LOOP // As written here, the loop function scans a keypad to triggers sounds // (stopping and restarting the voice effect as needed). If all you need // is a couple of buttons, it may be easier to tear this out and start // over with some simple digitalRead() calls. void loop() { uint8_t c, button; // Set current row to LOW logic state... digitalWrite(rows[r], LOW); // ...then examine column buttons for a match... for(c=0; c if(digitalRead(cols[c]) == LOW) { // First match. button = r * sizeof(cols) + c; // Get button index. if(button == prev) { // Same button as before? if(++count >= DEBOUNCE) { // Yes. Held beyond debounce threshold? if(wave.isplaying) wave.stop(); // Stop current WAV (if any) else stopPitchShift(); // or stop voice effect playfile(button); // and play new sound. while(digitalRead(cols[c]) == LOW); // Wait for button release. prev = 255; // Reset debounce values. count = 0; } } else { // Not same button as prior pass. prev = button; // Record new button and count = 0; // restart debounce counter. } } } // Restore current row to HIGH logic state and advance row counter... digitalWrite(rows[r], HIGH); if(++r >= sizeof(rows)) { // If last row scanned... r = 0; // Reset row counter // If no new sounds have been triggered at this point, and if the // pitch-shifter is not running, re-start it... if(!wave.isplaying && !(TIMSK2 & _BV(TOIE2))) startPitchShift(); } } //////////////////////////////////// HELPERS // Open and start playing a WAV file void playfile(int idx) { char filename[13]; (void)sprintf(filename,"%s.wav", sound[idx]); Serial.print("File: "); Serial.println(filename); if(!file.open(root, filename)) { PgmPrint("Couldn't open file "); Serial.print(filename); return; } if(!wave.create(file)) { PgmPrintln("Not a valid WAV"); return; } wave.play(); } //////////////////////////////////// PITCH-SHIFT CODE void startPitchShift() { // Read analog pitch setting before starting audio sampling: int pitch = analogRead(1); Serial.print("Pitch: "); Serial.println(pitch); // Right now the sketch just uses a fixed sound buffer length of // 128 samples. It may be the case that the buffer length should // vary with pitch for better results...further experimentation // is required here. nSamples = 128; //nSamples = F_CPU / 3200 / OCR2A; // ??? //if(nSamples > MAX_SAMPLES) nSamples = MAX_SAMPLES; //else if(nSamples < (XFADE * 2)) nSamples = XFADE * 2; memset(buffer1, 0, nSamples + XFADE); // Clear sample buffers memset(buffer2, 2, nSamples + XFADE); // (set all samples to 512) // WaveHC library already defines a Timer1 interrupt handler. Since we // want to use the stock library and not require a special fork, Timer2 // is used for a sample-playing interrupt here. As it's only an 8-bit // timer, a sizeable prescaler is used (32:1) to generate intervals // spanning the desired range (~4.8 KHz to ~19 KHz, or +/- 1 octave // from the sampling frequency). This does limit the available number // of speed 'steps' in between (about 79 total), but seems enough. TCCR2A = _BV(WGM21) | _BV(WGM20); // Mode 7 (fast PWM), OC2 disconnected TCCR2B = _BV(WGM22) | _BV(CS21) | _BV(CS20); // 32:1 prescale OCR2A = map(pitch, 0, 1023, F_CPU / 32 / (9615 / 2), // Lowest pitch = -1 octave F_CPU / 32 / (9615 * 2)); // Highest pitch = +1 octave // Start up ADC in free-run mode for audio sampling: DIDR0 |= _BV(ADC0D); // Disable digital input buffer on ADC0 ADMUX = ADC_CHANNEL; // Channel sel, right-adj, AREF to 3.3V regulator ADCSRB = 0; // Free-run mode ADCSRA = _BV(ADEN) | // Enable ADC _BV(ADSC) | // Start conversions _BV(ADATE) | // Auto-trigger enable _BV(ADIE) | // Interrupt enable _BV(ADPS2) | // 128:1 prescale... _BV(ADPS1) | // ...yields 125 KHz ADC clock... _BV(ADPS0); // ...13 cycles/conversion = ~9615 Hz TIMSK2 |= _BV(TOIE2); // Enable Timer2 overflow interrupt sei(); // Enable interrupts } void stopPitchShift() { ADCSRA = adc_save; // Disable ADC interrupt and allow normal use TIMSK2 = 0; // Disable Timer2 Interrupt } ISR(ADC_vect, ISR_BLOCK) { // ADC conversion complete // Save old sample from 'in' position to xfade buffer: buffer1[nSamples + xf] = buffer1[in]; buffer2[nSamples + xf] = buffer2[in]; if(++xf >= XFADE) xf = 0; // Store new value in sample buffers: buffer1[in] = ADCL; // MUST read ADCL first! buffer2[in] = ADCH; if(++in >= nSamples) in = 0; } ISR(TIMER2_OVF_vect) { // Playback interrupt uint16_t s; uint8_t w, inv, hi, lo, bit; int o2, i2, pos; // Cross fade around circular buffer 'seam'. if((o2 = (int)out) == (i2 = (int)in)) { // Sample positions coincide. Use cross-fade buffer data directly. pos = nSamples + xf; hi = (buffer2[pos] << 2) | (buffer1[pos] >> 6); // Expand 10-bit data lo = (buffer1[pos] << 2) | buffer2[pos]; // to 12 bits } if((o2 < i2) && (o2 > (i2 - XFADE))) { // Output sample is close to end of input samples. Cross-fade to // avoid click. The shift operations here assume that XFADE is 16; // will need adjustment if that changes. w = in - out; // Weight of sample (1-n) inv = XFADE - w; // Weight of xfade pos = nSamples + ((inv + xf) % XFADE); s = ((buffer2[out] << 8) | buffer1[out]) * w + ((buffer2[pos] << 8) | buffer1[pos]) * inv; hi = s >> 10; // Shift 14 bit result lo = s >> 2; // down to 12 bits } else if (o2 > (i2 + nSamples - XFADE)) { // More cross-fade condition w = in + nSamples - out; inv = XFADE - w; pos = nSamples + ((inv + xf) % XFADE); s = ((buffer2[out] << 8) | buffer1[out]) * w + ((buffer2[pos] << 8) | buffer1[pos]) * inv; hi = s >> 10; // Shift 14 bit result lo = s >> 2; // down to 12 bits } else { // Input and output counters don't coincide -- just use sample directly. hi = (buffer2[out] << 2) | (buffer1[out] >> 6); // Expand 10-bit data lo = (buffer1[out] << 2) | buffer2[out]; // to 12 bits } // Might be possible to tweak 'hi' and 'lo' at this point to achieve // different voice modulations -- robot effect, etc.? DAC_CS_PORT &= ~_BV(DAC_CS); // Select DAC // Clock out 4 bits DAC config (not in loop because it's constant) DAC_DI_PORT &= ~_BV(DAC_DI); // 0 = Select DAC A, unbuffered DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_DI_PORT |= _BV(DAC_DI); // 1X gain, enable = 1 DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); for(bit=0x08; bit; bit>>=1) { // Clock out first 4 bits of data if(hi & bit) DAC_DI_PORT |= _BV(DAC_DI); else DAC_DI_PORT &= ~_BV(DAC_DI); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); } for(bit=0x80; bit; bit>>=1) { // Clock out last 8 bits of data if(lo & bit) DAC_DI_PORT |= _BV(DAC_DI); else DAC_DI_PORT &= ~_BV(DAC_DI); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); } DAC_CS_PORT |= _BV(DAC_CS); // Unselect DAC if(++out >= nSamples) out = 0; } CODE I FOUND FOR IR  ClyonPumpkin That I want to integrate in above   /* * Text-to-speech example to speak the first n digits of pi. * The number is stored in flash, each digit is spoken one at a time. */ #include #include #include SdReader card;    // This object holds the information for the card FatVolume vol;    // This holds the information for the partition on the card FatReader root;   // This holds the information for the volumes root directory FatReader file;   // This object represent the WAV file for a pi digit or period WaveHC wave;      // This is the only wave (audio) object, since we will only play one at a time char eyesound[13]="eye2.wav"; int mute = 0; /* * Define macro to put error messages in flash memory */ #define error(msg) error_P(PSTR(msg)) // IR Remote code int RECV_PIN = 9;  // pin 11 used by SD card interface so select pin 9 for IR IRrecv irrecv(RECV_PIN); decode_results results; long lasttime=0, lastcode=0, timediff=0; //////////////////////////////////// SETUP void setup() {   // set up Serial library at 9600 bps   Serial.begin(9600);               if (!card.init()) {     error("Card init. failed!");   }   if (!vol.init(card)) {     error("No partition!");   }   if (!root.openRoot(vol)) {     error("Couldn't open dir");   }   irrecv.enableIRIn(); // Start the IR receiver } /////////////////////////////////// LOOP void loop() {   if(mute == 0) playcomplete(eyesound);   // check for keypress happened   if (irrecv.decode(&results;)) {      Serial.println(results.value, HEX);      switch (results.value) {        case 0x83228B74:    // 1          playcomplete("command.wav");          break;        case 0x83228F70:    // 2          playcomplete("entertan.wav");          break;        case 0x8322906F:    // 3          playcomplete("extermin.wav");          break;        case 0x83228A75:    // 4          playcomplete("leader.wav");          break;        case 0x8322847B:    // 5          playcomplete("survivor.wav");          break;         case 0x83227887:    // 6          playcomplete("atention.wav");          break;        case 0x8322629D:    // vol up          mute = 0;         // mute off          break;         case 0x83226E91:    // mute          { Serial.println("mute detected");            timediff=millis()-lasttime;            Serial.println(timediff);            if(lastcode!=results.value || (lastcode==results.value && (timediff>1600)) ) {               if( mute == 0 ) { // is mute off?                  Serial.println("toggle off to on");                  mute = 1;      // turn on                  // delay(1000);    // wait a bit for debounce                  break;                 }               if( mute == 1 ) { // is mute on?                  mute = 0;      // turn off                  Serial.println("toggle on to off");                  break;                 }              } // end if             break;           } // end case        } // end switch      lastcode = results.value;      lasttime = millis();      irrecv.resume();   // Receive the next value   } } /////////////////////////////////// HELPERS /* * print error message and halt */ void error_P(const char *str) {   PgmPrint("Error: ");   SerialPrint_P(str);   sdErrorCheck();   while(1); } /* * print error message and halt if SD I/O error */ void sdErrorCheck(void) {   if (!card.errorCode()) return;   PgmPrint("\r\nSD I/O error: ");   Serial.print(card.errorCode(), HEX);   PgmPrint(", ");   Serial.println(card.errorData(), HEX);   while(1); } /* * Play a file and wait for it to complete */ void playcomplete(char *name) {   playfile(name);   while (wave.isplaying);     // see if an error occurred while playing   sdErrorCheck(); } /* * Open and start playing a WAV file */ void playfile(char *name) {   if (wave.isplaying) {// already playing something, so stop it!     wave.stop(); // stop it   }   if (!file.open(root, name)) {     PgmPrintln("Couldn't open file ");     Serial.print(name);     return;   }   if (!wave.create(file)) {     PgmPrintln("Not a valid WAV");     return;   }   // ok time to play!   wave.play(); }

Topic by SithLordIII 


Arduino and GPS data logging - code/hardwire glitch

I've followed Gabriella Levine's code using an LS20031 GPS module. A couple of problems: 1. Can I run the SD card off the 3.3V arduino lead rather than using 5V and stepping it down (as one sketch suggested using a resister array)? 2. I've attached an image of what my Serial Monitor is reading and can't get it to align properly, feed consistently, etc. I've tried changing many aspects of the code, reverting back to original after each. Nothing seems to help. The only time I get a stream of NMEA data is when I reverse the Tx and Rx at the Arduino and hold the reset button - then it pours in. 3. I checked with my local hacker group last night but not too many are working on GPS projects - I've pasted my code below. If someone can confirm the wiring of this, that would be great. I'm still early in my Arduino project work. I made some notes in the code so you can see where I think the problems are.  4. Could it be that the baud rate (57,600) of the LS20031 is just too high? Milton //Gabriella Levine - starting code //https://www.instructables.com/id/Track-your-route-using-arduino-microSD-card-shi/#step1 //code (no shield, just a MicroSD like mine, different GPS, same idea with some good additional ideas // original code source: https://github.com/Protei/Protei-005-6/blob/master/GPS_GPRMCstringsParsed_toSD/GPS_GPRMCstringsParsed_toSD.pe //See website saved in folder for instructions on wiring - she has clear, direct approaches - very good. //My LS20031 GPS module (marked 1590R-A over a P) runs at a baud rate of 57600 (bytes per second) #include #include #include //this seems to be in the library but unclear - why isn't it orange like the others? #include // same with this - not sure what it's doing int ledPin = 13;                  // LED test pin int ledState = LOW; long previousMillise = 0; long interval = 1000; long previousMillis = 0; const int ledPin12 = 12; int rxPin = 0;                    // RX PIN int txPin = 1;                    // TX TX int byteGPS=-1; char linea[300] = ""; char comandoGPR[7] = "$GPRMC"; int cont=0; int bien=0; int conta=0; int indices[13]; const int chipSelect = 8;//changed from 53 on the Arduino Mega which Gabriella used const int LOCATION_FILE_NUMBER_LSB = 0x00; const int LOCATION_FILE_NUMBER_MSB = 0x01; File dataFile; void setup() {   pinMode(8, OUTPUT);   pinMode(ledPin12, OUTPUT);   pinMode(ledPin, OUTPUT);       // Initialize LED pin   pinMode(rxPin, INPUT);   pinMode(txPin, OUTPUT);   Serial.begin(57600); //GPS baud rate   // see if the card is present and can be initialized:   if (!SD.begin(chipSelect)) {     Serial.println("Card failed, or not present");     // don't do anything more:     return;   }   Serial.println("card initialized.");   Serial.println("Time, Status, Latitude, Direction, Longitude, Direction, Velocity, Heading, Date, Magnetic degrees, E/W, Checksum");   delay(1000); //this is the point where it seems to loop through without writing GPS data properly   // start the wire and RTC libraries:   Wire.begin();   //newlog();   dataFile = SD.open("NewGPS.txt",FILE_WRITE); //removed space before "File Write"   Serial.println("finishSetup");   delay(20); //this also seems to work as the SD Card does have this file with a few NMEA lines and then it just stops   for (int i=0;i<300;i++){       // Initialize a buffer for received data     linea[i]=' ';   }   } void loop() {   digitalWrite(ledPin, HIGH);   byteGPS=Serial.read();         // Read a byte of the serial port   if (byteGPS == -1) {           // See if the port is empty yet.     delay(100);   }   else {     linea[conta]=byteGPS;        // If there is serial port data, it is put in the buffer     conta++;                          //Serial.write(byteGPS, 0);     //dataFile.print(byteGPS, 0);     if (byteGPS==13){            // If the received byte is = to 13, end of transmission       digitalWrite(ledPin, LOW);       cont=0;       bien=0;       for (int i=1;i<7;i++){     // Verifies if the received command starts with $GPR         if (linea[i]==comandoGPR[i-1]){           bien++;         }       }       if(bien==6){               // If yes, continue and process the data         for (int i=0;i<300;i++){            if (linea[i]==','){    // check for the position of the  "," separator             indices[cont]=i;             cont++;           }           if (linea[i]=='*'){    // ... and the "*"             indices[12]=i;             cont++;           }         }         Serial.println("");      // ... and write to the serial port         for (int i=0;i<12;i++){           switch(i){           }           for (int j=indices[i];j<(indices[i+1]-1);j++){             Serial.print(linea[j+1]);           }           Serial.print(",");         }          Serial.println("---------------");         Serial.println();         if(dataFile)         {           dataFile.println("");      // ... and write to the serial port           digitalWrite(ledPin12, HIGH);           dataFile.println();           for (int i=0;i<12;i++){             switch(i){                          // case 0 :dataFile.print("Time in UTC (HhMmSs): ");break;                          // case 1 :dataFile.print("Status (A=OK,V=KO): ");break;                          // case 2 :dataFile.print("Latitude: ");break;                          // case 3 :dataFile.print("Direction (N/S): ");break;                          // case 4 :dataFile.print("Longitude: ");break;                          // case 5 :dataFile.print("Direction (E/W): ");break;                          // case 6 :dataFile.print("Velocity in knots: ");break;                          // case 7 :dataFile.print("Heading in degrees: ");break;                          // case 8 :dataFile.print("Date UTC (DdMmAa): ");break;                          // case 9 :dataFile.print("Magnetic degrees: ");break;                          // case 10 :dataFile.print("(E/W): ");break;                          // case 11 :dataFile.print("Mode: ");break;                          // case 12 :dataFile.print("Checksum: ");break;             }             for (int j=indices[i];j<(indices[i+1]-1);j++){               dataFile.print(linea[j+1]);             }             dataFile.print(",");           }           dataFile.println("");         }         else{           digitalWrite(ledPin12, LOW);         }         dataFile.flush();         Serial.flush();       }       conta=0;                    // Reset the buffer       for (int i=0;i<300;i++){            linea[i]=' ';                   }                     }   } }

Topic by IngenuityArts 


computer RAM upgrade stupid questions?

Well as it turns out, 8GB of RAM with Chrome and Kdenlive video editing software open at the same time causes Ubuntu to max out the RAM on my machine, and the machine will start to become very sluggish, eventually freezing for several minutes at a time with a high chance of never unfreezing. This used to be a very common issue that would occur with only google chrome open, due to a memory leak with my Gmail tabs. If I catch this sluggishness and eventually full system hang early enough, I can recover from it by entering CLI mode on ubuntu (alt+F1) and killing "chrome." After researching this problem a bit more, I created a swap file, since I do not have a SWAP partition, this helped delay the eventual unrecoverable system hang, but did not entirely fix the issue. I also tried different "swappiness" values, and also learned about this command "sudo sysctl -w vm.min_free_kbytes=400000" which supposedly forces a set amount of space to be unused in ubuntu. Looking at the system monitor this appears to do what it says, preventing a >95% RAM use, forcing swap to be used instead, and this was initially promising as it seemed to reduce the full system hangs, but created more small bugs, like freezing and stuttering wildly with buffered youtube videos, or playback in Kdenlive. A reboot seemed to have fixed that issue, but I'm not sure if those settings stuck around. ANYWAY; I guess there is no denying it, I simply do not have the RAM necessary for my workload anymore. I DO use intel HD integrated graphics, which uses the system RAM for graphics processing, so I wonder, will faster RAM allow slightly better graphics performance? My understanding is that GDDR is optimized for sheer bandwidth, not latency, while system DDRx RAM is optimized for latency. Does this mean my system will benefit more from high clock rate and high latency setting on a given RAM set, or is low clock and low latency RAM better? Most "gaming" orented builders seem to say RAM is not important other than esthetics and reliability. Also, is there a difference between buffered and unbuffered RAM?  Currently, the specs for my RAM are: Geil EVO Veloce GEV38GB1600C9DC 4GBx2 This RAM I got for "free" with my motherboard, and it seems to work with the following settings in the BIOS: . . .1600MHz @ 9-9-9-28 timings, 1.5V . . .1333MHz @ 9-9-9-24 timings, 1.5V . . .1800MHz @ 11-12-11-33 timings, 1.65V These are the fastest possible settings that will boot. Note, I was not too happy with the 1800MHz overclock, especially considering my computer was acting strange and crashed during an update, corrupting Ubuntu. I was able to repair the installation of some corrupted packages halfway installed. It did not seem to make any difference in some games on ubuntu, which is how I tested stability/speed. I have also had issues where while the BIOS system check passes, ubuntu puck errors all over me when I clocked at 1600MHz @ 9-9-9-24, even at 1.65V. There is really no overclocking this currently overpriced and mediocre RAM to any degree. The three settings above were the best settings I could get. The RAM I am currently looking at getting is: http://www.amazon.com/Crucial-Ballistix-PC3-12800-240-Pin-BLS2K4G3D169DS1J/dp/B00ZRG009S/ref=sr_1_1?s=pc&ie;=UTF8&qid;=1452056996&sr;=1-1&keywords;=BLS2K4G3D169DS1J It is the most affordable, and states that it is 4GBx2 of 1600MHz 9-9-9-24 RAM. I think I can underclock it to match the speed of the rest of my RAM and I think it should work well alongside. What do you guys think? I do not want to have to buy the $67 16GB if I can help it.

Question by -max-   |  last reply


Electronic Toolkit

I do some work with the FIRST Robotics kids and it is amazing to see what they are doing.  Big problem though seems to be a general lack of electrical test equipment.  They don't really have the money to buy oscilloscopes, function generators, CAN and I2C analyzers.   So I got one of the M3 Discovery boards from STmicro and it is really cool.  It has four 5MS A/Ds on it plus a whole host of other features(CAN, I2C, Serial etc.). http://www.st.com/web/en/catalog/tools/PF254044 So it got me thinking. Why couldn't we turn one of these chips into an "All-In-One" electrical toolkit and keep it cheap($50-$60, BOM ~$20).  It would be fairly easy to turnkey. I threw together some simple specs, what do people think. 1) Will supply general use drivers so a user can use the app or write their own. 2) Oscilloscope   a. Two Channel     i. 2MHZ of Analog Bandwidth per channel     ii. 10MS/s per channel     iii. Trigger on rising edge, falling edge, on-command, run-stop actions     iv. Datalogging for extended time periods at up to 10hz per channel (data stored directly to console),  maybe higher rate will  just have to see 3) Serial – 2 Ports   a. Multi selectable protocol w/slew control     i. RS232, RS422, RS485 4) CANBus – 1 port 5) I2C – 1 port 6) SPI  - 1 port 7) 8 Discrete User Selectable 8) Function Generator   a. Two Channel      i. 1MS/s small signal change      ii. 250kS/s full range change      iii. 0-3.3VDC buffered output  9) PWM - 4 Channels

Topic by ase4542   |  last reply


Having trouble measuring voltage with arduino.

I have posted this question before but I’ve made a few changes with my circuit with no luck. I’m trying to make a variable lab bench power supply with an lcd screen to read voltage and current while adjusting them. I’m using TL431 to have a 2.5v Vref and  a op amp in voltage follower configuration with 10M and 1M trimmer (Divider) on the input to finely calibrate 38v down to 2.5. The op amp is acting like a buffer. This is the code I've come up with: float volt; int sum = 0;                   unsigned char sample_count = 0; #define NUM_SAMPLES 10 void setup() {   analogReference(EXTERNAL);   Serial.begin(9600); } void loop() {   while (sample_count < NUM_SAMPLES) {    sum += analogRead(A0);    sample_count++;    delay(10);     }    volt = ((float)sum / (float)NUM_SAMPLES * 2.5) / 1023.0;     Serial.println(volt * 15.2 ,3);     sample_count = 0;     sum = 0; } Parts list: LM358 (for now, will upgrade to a unity gain stable op amp) 10M 5% resistor 1M trimmer Arduino Mega (Will use a pro mini in the final circuit) Breadboard (Will this effect my readings?) TL431 (2.5v Vref) Yes I now the LM358 is not suited for this application but I don’t think this will affect my readings by much, about 5% maybe. Will it? This code is gives me OK values at start but when I start to decrease/Increase the voltage. It lags behind and offsets by 1-2 volts on the reading. My goal with this project is to read (LIVE, meaning while changing voltage with buttons and see it change without any offset/lag) Voltage with a resolution of +-5/10mv accuracy and also read current (But thats for a later day). One last thing, I’m 16 so a lot of electronic terms tend to go over my head so please while giving an answer keep it simple if possible. Thanks :D

Question by faraz ahmed khan   |  last reply


analog demultiplexing?

Is it a good idea to use just a single DAC to produce 2 or more separate analog outputs? I do not need super fast updating rate, but I do need precision. My DAC is a old but pretty cool looking DAC71, of which I have like a handful. It has a 16 bit parallel interface (which is a REAL PAIN) and a CC output. Placing a small resistor on the output of that gives me a voltage range. To interface it to an arduino, I used two 74C164 shift registers so that I only use 2 pins on the arduino. (one for clock, the other for data). However, the DAC does not have an updating rate, it is kinda analog in that respect. Because of that, you can see all the garbage from the shift register outputs while data is being shifted in. My current solution to this problem was to use a spare TL601 analog switch and a 3rd wire from the arduino to "mask" the updating period when data is being shifted into the registers. This worked well, until the wire popped out and came into contact with +12V rail, killing arduino pin 10. :(  so sad, it was literally a brand new arduino clone... In a similar fashion that the output of a single ignition coil in a car is fed into a distributor to distribute voltage to the correct spark plugs, is it OK to use a few more analog switches to do some interlacing? Are there things that I potentially have not considered? My idea is that after data for, say, output A has been shifted into the 2 registers, the arduino will activate switch A and (through a buffer amp) charge a capacitor up to the same voltage, then turn switch A off while shifting in data for output B, then activating switch B to allow the capacitor to charge up to that voltage, and again the switches turn off to let new data for output A shift in, and the process repeats. The capacitors will "remember" what voltage they held during the off period, as sort of analog memory. I think the updating rate will take a hit, but oh well.

Question by -max- 


How can I generate a formatted HTML file with PHP?

I'm doing a major reconstruction of my website. I want it to be more dynamic and interactive (CMS), something like Instructables. I already started the login-logout cookie system, establish a MySQL database and found a user friendly text editor. I'm planning to buy a ".com" domain if I get the system to work. I'm not trying to compete with ibles or anything, but rather just want to make a site where I can post guides then display it on my homepage. Similar to the GUI of ibles.  My Site: ASCAS.tk Can you guys help me find a decent PHP code that would generate formatted html files, so that I would be able to post step-by-step guides similar to instructables... Don't worry about the database, and the text editor, I'll just figure it out.  As a sign of gratitude, I would like to gave away a patch or a 3 month Pro-membership to the person who gets the best answer :D  _____________________________________ //I found a code, but sadly I can't get it to work :(  error_reporting(E_ALL); require_once 'KvzHTML.php'; // These are the default options, so might // as well have initialized KvzHTML with an // empty first argument $H = new KvzHTML(array(   'xhtml' => true,   'track_toc' => false,   'link_toc' => true,   'indentation' => 4,   'newlines' => true,   'echo' => false,   'buffer' => false,   'xml' => false,   'tidy' => false, )); echo $H->html(   $H->head(       $H->title('My page')   ) .   $H->body(       $H->h1('Important website') .       $H->p('Welcome to our website.') .       $H->h2('Users') .       $H->p('Here\'s a list of current users:') .       $H->table(           $H->tr($H->th('id') . $H->th('name') . $H->th('age')) .           $H->tr($H->td('#1') . $H->td('Kevin van Zonneveld') . $H->td('26')) .           $H->tr($H->td('#2') . $H->td('Foo Bar') . $H->td('28'))       )   ) ); ?>

Question by ASCAS