The forums are retiring and are now closed for new topics and comments. The existing content will remain online and accessible through 2020 to provide everyone the opportunity to save any relevant information. In the spring of 2021, these Community forums will be taken offline.

Search for msg in Topics


Msg to cvs conversion?

Is there any program out there that converts msg programs to msg files? I have googled it and no programs that were useful came up. Any help?

Question by schoonovermr  


How to test for MSG in foods?

I am looking for instructions to make a inhome testing kits for presence of Monosodium Glutamate in every day food.

Question by hemamalini    |  last reply


Number of msgs in Inbox not showing up

. At the top-right of the page (avatar/You/INBOX/.../logout), the number of msgs in my Inbox is no longer displaying. Maybe because I have zero msgs, but it used to tell me that.

Topic by NachoMahma    |  last reply


send pictures via pvt msg

Hi i want to send pictures to somone of an amp problem i have need to be on a pack like this is there one these are the pick going to some one called slowpoke if you can help...

Topic by andybuda    |  last reply



CMD Batch Can Anyone Help? Answered

Hey guys i was just wondering how do i make the image start AFTER the last message?my batch is down there@echo offmsg * hellomsg * whomsg * aremsg * youmsg * immsg * themsg * hackermsg * youvemsg * beenmsg * verymsg * badmsg * somsg * immsg * goingmsg * tomsg * teachmsg * youmsg * amsg * lesson!start http://www.fugly.com/media/IMAGES/WTF/fat-guy-in-a-diaper.jpg

Question by Micksta    |  last reply


Hitting Enter in PM Subject field sends msg

. Subject says it all. Can you just reject Enters in the Subject fld?

Topic by NachoMahma    |  last reply


Can someone trace all the calls, text Msgs, social app Msgs from my phone? Incase yes then how?

I want to know if someone can trace all the details of my phone and incase it's possible then how do I get rid of the same.

Question by Rikesh333    |  last reply


how do you find someones profile to msg them?

My buddy just became a member and idk how to find his thing to msg him???

Question by irishkorene    |  last reply


Either my inbox (msgs) or my Inbox link has a problem...

On each page that has a link to my INBOX, I am showing: INBOX (1)When I click on it, and go to the inbox, the top message is about one day old and I see nothing new. No new PM, so either there is a new one and it is not showing, or there isn't one and the indicator for how many new messages I have in my inbox is wrong.

Topic by Goodhart    |  last reply


I2C addresses > 63 are not usable with atTiny85?

Hi I have a big problem with addressing multiple attiny85-chips with I2C: For what I know the attiny uses 7-bit addresses for communication. I am using the TinyWireS lib, which works perfectly fine for me, untill I am reaching address: '64' which is '1000000' in binary. The highest usable address should be '1111111'. Here is the attiny85 datesheet. This is what happens: Slave: Attiny85: switches led on or off when msg is received over I2C. Slaveaddress: 64 #include #include #define output (4) #define I2C_SLAVE_ADDR (64) //works if I2C_SLAVE_ADDR < 64 void setup() {   TinyWireS.begin(I2C_SLAVE_ADDR);   pinMode(output, OUTPUT); } volatile bool state = LOW; void loop() {   byte msg = -1;   if(TinyWireS.available())     msg = TinyWireS.receive();   if(msg == 1)     state = HIGH;   else if(msg == 0)     state = LOW;   else if(msg == 2)     state = !state;   digitalWrite(output, state); } Master: Arduino pro mini: sendMsg(0, true); //works! led on chip: 64 switches on sendMsg(64, true); //fails! led on chip: 64 is off. #include #define DEVICE (64) //0 works! void setup() {     Wire.begin(); } void loop() {     sendMsg(1, DEVICE);     delay(2000);     sendMsg(0, DEVICE);     delay(2000); } void sendMsg(int msg, int device) {     Wire.beginTransmission(device);     Wire.write(msg);     Wire.endTransmission(); } Have you any idea how to solve this problem?

Question by DELETED_MakiY2    |  last reply



Bar prevents log in from web page

The msg title says it all

Topic by lepercan    |  last reply



Able to color text?

For example your using a computer in the batch game and it prints out something normally the text is black, but is there a way for the computers msg to be yellow

Question by royalroachemail    |  last reply


Need help with code from Arduino

Hi everyone. Want someone to build me a code for arduino. Its a simple project with GSM included. More info msg me. Thanks

Topic by Bisc  


How can I solve "ModuleNotFound" error in Python?

Hello everyone! Although I installed firebase "ModuleNotFoundError: No module named 'firebase' is showing as error msg; How can I fix Thanks

Question by Htet Yan    |  last reply


MS Project cannot open the file? Answered

My .mpp files are failing to open in the MS Project. I get the msg "Cannot open file. The file may be corrupted". Any ideas anyone? Thanks!

Question by hbaumgart    |  last reply



Can someone help me with my game?

I have part of the script written but I do need help with some of the stuff: -Engine -Voices -Art -Music Etc. Msg me if you wanna help :)

Question by builderkidj    |  last reply


Can someone help me with my game?

I have part of the script written but I do need help with some of the stuff: -Engine -Voices -Art -Music Etc. Msg me if you wanna help :)

Topic by builderkidj  


Cannot access pre-existing &quot;non-pro&quot; topic (and captcha not required for PM)

Part 1:I can no longer access this topic:https://www.instructables.com/community/Could-this-be-used-as-a-guitar-amp-or-converted-in/...which I had replied to earlier. It was created by jackillac92 a day or two ago.When clicking on the above URL, it's redirected to:https://www.instructables.com/account/gopro?nxtPgName=/community/Could-this-be-used-as-a-guitar-amp-or-converted-in/&nxtPg;=/community/Could-this-be-used-as-a-guitar-amp-or-converted-in/Part 2:When I sent a PM to jackillac92 to notify him that I could see his msgs but not respond, I was NOT sent through the usual captcha hoop before the msg was sent.

Topic by gmoon    |  last reply


I got an LCD from an old table phone and wanted to play with it a bit.?

I found out that you can send msgs to the LCD for it to show by connecting it to the parralel port. I really want to know about both the parallel port and how the LCD functions. In a simple way ofcourse?

Question    |  last reply


&quot;Invalid formatting&quot; error when inserting link

. When trying to insert a (valid) link to http://en.wikipedia.org/wiki/Executive_order_(United_States) , I get the following error msg:Invalid formatting in the comment.. Getting rid of everything after the "r" cleared it up, so I'm assuming it's the parentheses that trip the error.

Topic by NachoMahma    |  last reply


How can i take screen shots with my computer? normal ones give me lines. HELP? Answered

I need a picture of my pc screen w/ a msg box, but normal cameras make lines appear. can i make a screen shot in another way?

Question by Timmydamonkey    |  last reply


i logon to find im asked to be Pro .. but...

but my pro membership doesnt expire til October 2, 2011 Other consequences: am forbidden to have 'one page' 'structables .. cant download PDF's ... and it makes me cranky... but reversibly so! but, now, this msg to you is not working .. i 'Preview' but then cant 'submit'.. NO button! sigh jon tkjtkj tkjtkj@gmail.com

Topic by tkjtkj    |  last reply


DC treadmill motors 1.5-3 hp great for hobby, windmill, small EV's

I'm a fitness repair technician, i get some really good motors from time to time. Usually posted to ebay under seller name guaranteed_goods....i have 2 or 3 up at the time of this posting... feel free to msg me with what you are looking for....

Topic by mickeyaaaa  


"Stats" box servlet error

Clicking the Stats tab in any instructable triggers a pretty heavy servlet error (and exception list.) Error msg: ERROR 500: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${stats.TotalHits}": Unable to find a value for "TotalHits" in object of class "com.instructables.model.helper.Stats" using operator "." (null) There were some changes added overnight (book contest navigation, above each entry), which might have contributed...

Topic by gmoon  


Wanted Arduino code writer (will pay)

Hi friends. I need someone to help me write Arduino code for my project. I will pay 20 US$ for each code you make...will put the money to your paypal account, or if you like can order something for you from EBAY and ship to your address.. please msg me I send you the flowchart and what the code is sopposed to do. Thanks

Topic by goldenshuttle    |  last reply


Using Water as a Fuel?

Hi friends. I wana use water as a fuel, i have made different type of hydrogen generators, but the problem is that flame temperatur of hydrogen is too high. So kindly any body have any suggestion, comment, or wana share any experence. If any body can help me out in this regard please u r most welcome. Can leave any msg and comment here at (instructables) and also can email me at rpttc at yahoo.com

Question by rpttc1    |  last reply


Problem in Uploading to Arduino Dicimila Board

Hi i m using Arduino Dicimila For my project. When i upload programs i got Error with this Msg::::Binary sketch size: 2380 bytes (of a 14336 byte maximum)avrdude: stk500_getsync(): not in sync: resp=0x00avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51Before that i done many uploades :), I've selected correct  port and Board... But still uploading problem...Can anyone help me to over this...?

Question by sabari1000    |  last reply


help code problems i want to pause each word after is scrolls in for about half a sec or so

I believe this is the section of code that needs to be altered? // Plot each character of the message one column at a time, updated the display, shift bitmap left. void AlphabetSoup1() {   char msg[] = "  Enjoy the Vittles  ";   for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)   {     int alphabetIndex = msg[charIndex] - ' ';     if (alphabetIndex < 0) alphabetIndex=0;         //-- Draw one character of the message --     // Each character is only 5 columns wide, but I loop two more times to create 2 pixel space betwen characters     for (int col = 0; col < 6; col++)     {       for (int row = 0; row < 8; row++)       {         // Set the pixel to what the alphabet say for columns 0 thru 4, but always leave columns 5 and 6 blank.         bool isOn = 0;         if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;         Plot( numCols-1, row, isOn); // We ALWAYS draw on the rightmost column, the shift loop below will scroll it leftward.       }            //-- The more times you repeat this loop, the slower we would scroll --       for (int refreshCount=0; refreshCount < 10; refreshCount++)         RefreshDisplay();       //-- Shift the bitmap one column to left --       for (int row=0; row<8; row++)       {         for (int zone=0; zone < numZones; zone++)         {           // This right shift would show as a left scroll on display because leftmost column is represented by least significant bit of the byte.           bitmap[row][zone] = bitmap[row][zone] >> 1;                     // Roll over lowest bit from the next zone as highest bit of this zone.           if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 4, bitRead(bitmap[row][zone+1],0));                   }       }     }   } }

Question by bdexter    |  last reply


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


lighting an led using mobile phone radiation.

When i went to science fair, i happened to c a simple circuit with an led. they brought a cell phone near to the circuit.. when we call or send msg to that mobile phone, the led started to glow. can anyone help me in building such a circuit? a simple one is enough.. thanx in advance.

Question by allsparkunleashed    |  last reply


I cannot get into Etsy- this is a problem!

Everytime I try to get to my store, or even the main page, i get a connection timeout response. But everything else is working fine, i clearly am connected to the internet. I tried upgrading my Firefox, tried deleting my cookies, and nothing works. I really need to do work on my etsy, and this is not helping! Anyone? Thank you! this is the msg- "Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again."

Topic by gildedpeach  


Ible delayed posting no longer new.

If you have an ible delayed of being posted for who knows what reason. When it gets posted it gets posted in the spot that it would of been  originally. Example, on 6/1 i published 3 ibles in one day. One posted in 10 minutes. The other 2 posted on 6/4. Now the two late posts do not get put at the top with the new ibles, no it gets put in at the date it was first submitted. My variable voltage supply took 6 days to post. So to find it you have to go through many pages of ibles to locate it. IT does not get posted as the newest ible. I had sent a msg to service@instructables but never did get a real person.    If peoples ibles are delayed for some flagging issue or what ever it would be nice to know what to avoid in the future. I have gotten a tip on some issues that may trip the filters, short keywords, not common or unrecognizable keywords. Such as eek. In msg or forums delays maybe from short question with active links.. These are tips are from someone that has been observing these things and are not a locked in rule.   Altho these are somewhat of gripes it is not anything that will stop me from posting ibles. I realy gain from Instructables. Before i joined here i never heard of Arduino now i am writing small sketches and manipulating larger ones.

Topic by WWC    |  last reply


rca power supply

I was wondering if anyone could post how to make a simple rca power supply for a tattoo machine. Just a plain rca female input like off the game cords, not the guitar amp. it needs only to supply 3-4 volts of power. maybe an old walkman or something? when i have the smallest cutest girly homeade tattoo machine that i want to post but i want to make sure it works properly first, it runs off batteries right now but i want to be able to plug it in. if someone does this project could they msg me when its posted? thanks :)

Topic by Mendalite    |  last reply


Virtualwire RF 433mhz Voltage problem

Hi, i am trying to have it switch a 5v relay on pin 8 receiver side only when pin 2 transmitter side in held down. I have set up a XY-MK 5v transmitter , Push button to pin 2 live when pushed 3.3v Data rf transmitter to pin 4 and 5v,gnd and receiver, data pin 2 5v and gnd led to pin 8 and gnd Here are the codes. Transmitter Code= #include const int button = 2; const int transmit_pin = 4; const int receive_pin = 2; const int transmit_en_pin = 3; void setup() {   // Initialise the IO and ISR   Serial.begin(9600);   vw_set_tx_pin(transmit_pin);   vw_set_rx_pin(receive_pin);   vw_set_ptt_pin(transmit_en_pin);   vw_set_ptt_inverted(true); // Required for DR3100   vw_setup(2000);  // Bits per sec } byte count = 1; void loop() {   char msg[7] = {'h','e','l','l','o',' ','#'};   if     (digitalRead(button) == HIGH)   {Serial.println("on its way");   msg[6] = count;   //digitalWrite(led_pin, HIGH); // Flash a light to show transmitting   vw_send((uint8_t *)msg, 7);   Serial.println("on its way");   vw_wait_tx(); // Wait until the whole message is gone   //digitalWrite(led_pin, LOW);   //delay(1000);   count = count + 1; } } And receiver code = #include const int led_pin = 8; const int transmit_pin = 12; const int receive_pin = 2; const int transmit_en_pin = 3; void setup() {     delay(1000);     Serial.begin(9600); // Debugging only     Serial.println("setup");     // Initialise the IO and ISR     vw_set_tx_pin(transmit_pin);     vw_set_rx_pin(receive_pin);     vw_set_ptt_pin(transmit_en_pin);     vw_set_ptt_inverted(true); // Required for DR3100     vw_setup(2000);  // Bits per sec     vw_rx_start();       // Start the receiver PLL running } void loop() {     uint8_t buf[VW_MAX_MESSAGE_LEN];     uint8_t buflen = VW_MAX_MESSAGE_LEN;     if (vw_get_message(buf, &buflen;)) // Non-blocking     { int i;         digitalWrite(led_pin, HIGH); // Flash a light to show received good message // Message with a good checksum received, print it. Serial.print("Got: "); for (i = 0; i < buflen; i++) {      Serial.print(buf[i], HEX);      Serial.print(' '); } Serial.println();         digitalWrite(led_pin, LOW);     } } I have tried many different codes i have found and this works the best but.........the voltage is only going from 0.20v to 0.40 on the receiver pin 8. i need this to be 5v any ideas?

Topic by Senken    |  last reply


What are all these cookies on Instructables, etc?

I don't know if most people can read their own cookies.Today when I signed on instructables with a clear cache , I got these cookies:consumerist.com SESSID_GANJAconsumerist.com GANJAUSERSETTINGSApparently ganja means smoking pot. Why give me those cookies?Here are some other cookies I think stink.ACIDBASEROLL (< who's being "wicked ... in High places"? Everybody must get stoned?)doubleclick.* (tracking cookie)hitbox.* (tracking cookie)2o7.* (tracking cookie)KIDYMD paypal.com (when I haven't been there)RU4 (are you for... as in RU4 86? what are you for?)test-loyalty (do you like Bush?)lucky# geoinfo (where are you now?)FLASH9 (hidden)I will post more sneaky looking cookies as I get them. I can't remember more now.If anyone is a truthful expert on cookies, share more clues.dttd://CMD MSG 41387 04551.70280 ETX (user defined protocol)

Topic by VIRON    |  last reply


Arduino project

HiWonder if someone can help me with this code.Im using the arduino uno board with the sim808.Everything is working fine but can only work in stages. When i send "Track" it sends me back my location,when sending sms "ON" relay swiches on etc.When i start the module and want to find out the "STATE" its not working.Must first send "Track" then "ON" then "OFF" and the i can get the State reply.Why is it working in steps?My Code:#include #include #includeSoftwareSerial gps(0,1);DFRobot_SIM808 sim808(&Serial;);const int relay = 3;String lampState = "HIGH";#define samples 10#define minVal -50#define MaxVal 50String msg = String("");int i=0,k=0;int gps_status=0;float latitude=0; float logitude=0; String Speed="";String gpsString="";char *test="$GPRMC";void initModule(String cmd, char *res, int t){ while(1) { Serial.println(cmd); Serial.println(cmd); delay(100); while(Serial.available()>0) { if(Serial.find(res)) { Serial.println(res); delay(t); return; } else { Serial.println("Error"); } } delay(t); }}void setup() { pinMode(relay, OUTPUT); digitalWrite(relay, HIGH); //mySerial.begin(9600); Serial.begin(9600); gps.begin(9600); while(!sim808.init()) { Serial.print("Sim808 init error\r\n"); delay(1000); } delay(3000); Serial.println("Init Success, please call or send SMS message to me!"); //************* Turn on the GPS power************ if( sim808.attachGPS()) Serial.println("Open the GPS power success"); else Serial.println("Open the GPS power failure"); { Serial.println("Initializing...."); initModule("AT","OK",1000); initModule("ATE1","OK",1000); initModule("AT+CPIN?","READY",1000); initModule("AT+CMGF=1","OK",1000); initModule("AT+CNMI=2,2,0,0,0","OK",1000); Serial.println("Initialized Successfully"); for(int i=0;i delay(2000); get_gps(); show_coordinate(); delay(2000); Serial.println("System Ready.."); }}void sendSMS(String message){ Serial.println("AT"); delay(500); Serial.println("AT+CMGF=1"); delay(500); Serial.print("AT+CMGS="); Serial.print('"'); Serial.print("1111111111"); Serial.println('"'); delay(100); // Send the SMS Serial.println(message); delay(100); Serial.println((char)26); delay(100); Serial.println(); delay(5000); }void loop() {if(Serial.available() ){if(Serial.find("Track")) get_gps(); show_coordinate(); Serial.println("Sending SMS"); Send(); Serial.println("SMS Sent"); delay(2000);} if (Serial.find("ON")) { // Turn on relay and save current state digitalWrite(relay, LOW); lampState = "on"; Serial.println("Relay set to ON"); msg = ""; } if (Serial.find("OFF")) { // Turn off relay and save current state digitalWrite(relay, HIGH); lampState = "off"; Serial.println("Relay set to OFF"); msg = ""; } if (Serial.find("STATE")) { String message = "Lamp is " + lampState; sendSMS(message); Serial.println("Lamp state resquest"); msg = ""; }} void gpsEvent(){ gpsString=""; while(1) { while (gps.available()>0) //Serial incoming data from GPS { char inChar = (char)gps.read(); gpsString+= inChar; //store incoming data from GPS to temparary string str[] i++; // Serial.print(inChar); if (i < 7) { if(gpsString[i-1] != test[i-1]) //check for right string { i=0; gpsString=""; } } if(inChar=='\r') { if(i>60) { gps_status=1; break; } else { i=0; } } } if(gps_status) break; }}void get_gps(){ gps_status=0; int x=0; while(gps_status==0) { gpsEvent(); int str_lenth=i; coordinate2dec(); i=0;x=0; str_lenth=0; }}void show_coordinate(){ Serial.print("Latitude:"); Serial.println(latitude); Serial.print("Longitude:"); Serial.println(logitude); Serial.print("Speed(in kmph)="); Serial.println(Speed);}void coordinate2dec(){ String lat_degree=""; for(i=20;i<=21;i++) lat_degree+=gpsString[i]; String lat_minut=""; for(i=22;i<=28;i++) lat_minut+=gpsString[i]; String log_degree=""; for(i=32;i<=34;i++) log_degree+=gpsString[i]; String log_minut=""; for(i=35;i<=41;i++) log_minut+=gpsString[i]; Speed=""; for(i=45;i<48;i++) //extract longitude from string Speed+=gpsString[i]; float minut= lat_minut.toFloat(); minut=minut/60; float degree=lat_degree.toFloat(); latitude=degree+minut; minut= log_minut.toFloat(); minut=minut/60; degree=log_degree.toFloat(); logitude=degree+minut;}void Send(){ Serial.println("AT"); delay(500); Serial.println("AT+CMGF=1"); delay(500); Serial.print("AT+CMGS="); Serial.print('"'); Serial.print("0742296587"); //mobile no. for SMS alert Serial.println('"'); Serial.print("Latitude:"); Serial.println(latitude); delay(500); Serial.print(" longitude:"); Serial.println(logitude); delay(500); Serial.print(" Speed:"); Serial.print(Speed); Serial.println("kmph"); delay(500); Serial.print("http://maps.google.com/maps?&z;=15&mrt;=yp&t;=k&q;="); Serial.print(-latitude,6); Serial.print("+"); //28.612953, 77.231545 //28.612953,77.2293563 Serial.print(logitude,6); Serial.write(26); delay(2000);}void serialPrint(){ while(Serial.available()>0) { Serial.print(Serial.read()); }}ThanksHein

Question by heindup  


want to display my text on a tft lcd like sony bravia using db9 input

Hello!           i am working on a project.. my last phase is to display the text on any lcd (other the alphanumeric and small mobile lcds) i wish to display my text on sony bravia using its db9 input.. well apart from this lcd i can also display my text on any tft monitor... i just need some help about the circuit to use and how to display.... about my project:                                 my project is that i am getting a sms on my reciving module i-e sony Ericsson t-290 and through a rs-232 data cable my msg is retrieved via at-command into the microcontroller after passing through max 232 converter then it is displayed on the led display.. work to do: now apart from the led display i want to display it on the big tft lcd or tft monitor for that i might need a video circuit consisting of video ic's etc.. i need help in building that.. Thankz

Topic by sani    |  last reply


Application: Sequential Search in asm ?

Hi  This question and the code works But the problem is that it when u the number not found the prog print both msg help me thank you noor. _____________________________________________________---- write a program that asks the user to enter an integer        By writing Enter the Number ----------------------------- : And then perform the  Linear Search for the user entered number in an Integer Array given below : intArray    SDWORD   -18,40,5,-11,66,4,-7,10,16 If the number is found , it displays , Yes the numbers exists in the list. If the number is not found then it  displays. The number is not found in the list. ___________________________________________---- TITLE sum of the integer .686 .MODEL FLAT,STDCALL .STACK INCLUDE Irvine32.inc .data a sdword ? str1 byte "enter the number   :  ",0 str2 byte "Yes the numbers exists in the list",0 str3 BYTE "The number is not found in the list",0 intarray sdword -18,40,5,-11,66,4,-7,10,16 .CODE MAIN PROC mov edx,offset str1 call writestring call ReadInt mov a,eax call Search exit main endp Searchproc proc uses ecx jne notfound mov esi,offset intarray mov ecx,lengthof intarray l1: cmp[esi],eax je found add esi,4 loop l1 jmp notfound notfound: mov edx,offset str3 call writestring ;call writeint call crlf found: mov edx,offset str2 call writestring call crlf ret exit Searchendp end main _______________________________________________

Question by a7la nono    |  last reply


Unable to retrieve Rfid variable.

I am unable to retrieve string (RFID) from Arduino connected to Android app through Bluetooth . Arduino code #include #include #include #define SS_PIN 10 #define RST_PIN 9 char command; String string; MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class MFRC522::MIFARE_Key key; byte nuidPICC[3];// Init array that will store new NUID String RFID; void setup() {   Serial.begin(9600);   SPI.begin(); // Init SPI bus   rfid.PCD_Init(); // Init MFRC522 } void loop() {   if ( ! rfid.PICC_IsNewCardPresent())     return;   // Verify if the NUID has been readed   if ( ! rfid.PICC_ReadCardSerial())     return;        for (byte i = 0; i < 4; i++) {       nuidPICC[i] = rfid.uid.uidByte[i];       if(i==0)       {         RFID=String(nuidPICC[i],HEX);         //Serial.println(RFID);       }       else       {        String temp =String(nuidPICC[i],HEX);        RFID=String(RFID + temp);        }    }       //Serial.println("\n Rfid :-");    //Serial.println(RFID);      if (Serial.available() > 0)     {string = "";}         while(Serial.available() > 0)     {       command = ((byte)Serial.read());             if(command == ':')       {         break;       }             else       {         string += command;       }             delay(1);     }     if(string == "TO")     {        // ledOn();         //ledon = true;         //Serial.println(RFID);     }     rfid.PICC_HaltA();   // Stop encryption on PCD   rfid.PCD_StopCrypto1(); } Android Code rfid.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 readrfid();             }         });  --------------------------------------------------------------------------------------------     // This will be the Readfrom Rfid !     private void readrfid()     {         String tp;         if (btSocket!=null)         {             try             {                 btSocket.getOutputStream().write("TO".toString().getBytes());                 ins = btSocket.getInputStream();                     while(ins.available() > 0)                     {                         //Reading from serial input                         valor= Byte.toString((byte)ins.read());                     }                 //Displaying readed value                 Toast.makeText(getApplicationContext(), valor , Toast.LENGTH_SHORT).show();             }             catch (IOException e)             {                 msg("Error");             }         }     } Thank You.

Question by HiteshP16  


Chat

Hellow everyone, i kinda run into this site, and this group, and i made an acc as you can see :3 i kinda made a chat today in batch, pretty simple and using Dropbox, but i haz some ideas with powershell and using an FTP. but here is a pic of how it works and the code ofcorse! code client: @echo off SET name=%username% color 0a :main cls echo ############################# echo #welcome to the dropbox chat# echo ############################# echo. echo Make your sellection bellow! echo. echo [1]-Collor menu echo [2]-Chat name echo [3]-Chatroom echo [4]-Info (waar normaal nooit iemand kijkt) echo name: %name% echo. :sellect1 set /p C=Sellection: if "%C%"=="1" goto collor if "%C%"=="2" goto name if "%C%"=="3" goto chat1 if "%C%"=="4" goto info if Else goto main /goto main :chat1 echo %name% just joined the chat>>chat.txt goto chat :collor cls echo ############ echo #COLLORS!!!# echo ############ echo. echo pick a collor echo. echo [1]- White echo [2]- Green echo [3]- Red echo [4]- Purple echo [5]- Blue echo [6]- Yellow echo. echo [0]- Main menu echo. :sellect2 set /p C=Collor: if "%C%"=="1" color F if "%C%"=="2" color A if "%C%"=="3" color C if "%C%"=="4" color D if "%C%"=="5" color B if "%C%"=="6" color E if "%C%"=="0" goto main goto collor :name cls echo ############### echo #create a name# echo ############### echo. echo Type in your name (please dont use spacebar) echo. :sellect3 set /p C=Name: SET name=%C% goto main :chat cls echo ######## echo #-CHAT-# echo ######## echo. echo Every msg you type will be added in the chat.txt file, echo so chek on that file for the chat. echo. :sellect3 set /p C=: echo [%time%] %name%:%C%>>chat.txt if "%C%"=="/clear" goto del if "%C%"=="/afk" echo %name% is currently afk>>chat.txt if "%C%"=="/back" echo %name% is no longer afk>>chat.txt if "%C%"=="porn" echo %name% is a perv>>chat.txt goto chat :del del chat.txt goto chat code reader: @echo off :1 cls type chat.txt PING -n 2 127.0.0.1>nul goto 1 thats a bit it, kinda simple i know, but its fun to use and fun to make, feedback is always welcome! ^__^ have a great day/night bye!

Topic by dwngrt    |  last reply


Cannot access link

Cannot access the following link (from Google): https://www.instructables.com/id/Teach-Yourself-to-Play-Harmonica/ Attempting to do so produces the following error msg: Please excuse me, that was very impolite! - javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/common/layout_bootstraped.jspx': ServletException in '/pages/explore/type/instructable_content.jsp': java.lang.reflect.InvocationTargetException Exception javax.servlet.jsp.JspException: ServletException in '/common/layout_bootstraped.jspx': ServletException in '/pages/explore/type/instructable_content.jsp': java.lang.reflect.InvocationTargetException at org.apache.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:923) at org.apache.tiles.taglib.InsertTag.doEndTag(InsertTag.java:457) at _jsp._pages._explore._type._instructable__jsp._jspService(_instructable__jsp.java:461) at com.caucho.jsp.JavaPage.service(JavaPage.java:60) at com.caucho.jsp.Page.pageservice(Page.java:570) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179) at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:485) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:350) at com.instructables.servlet.ActionServlet.sendToJspPage(ActionServlet.java:330) at com.instructables.servlet.ActionServlet.handleResult(ActionServlet.java:247) at com.instructables.servlet.ActionServlet.prepare(ActionServlet.java:205) at com.instructables.servlet.ActionServlet.doGet(ActionServlet.java:90) at javax.servlet.http.HttpServlet.service(HttpServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) at com.caucho.filters.GzipFilter.doFilter(GzipFilter.java:208) at com.instructables.filter.FilterWrapperFilter.doFilter(FilterWrapperFilter.java:47) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.instructables.filter.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:48) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.instructables.filter.TemporaryProFilter.doFilter(TemporaryProFilter.java:78) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.instructables.filter.TemporaryPasswordFilter.doFilter(TemporaryPasswordFilter.java:46) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.instructables.filter.SecurityFilter.doFilter(SecurityFilter.java:122) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.instructables.filter.SetupFilter.doFilter(SetupFilter.java:71) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173) 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) Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/pages/explore/type/instructable_content.jsp': java.lang.reflect.InvocationTargetException at com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java:1120) at _jsp._common._layout_0bootstraped__jspx._jspService(_layout_0bootstraped__jspx.java:252) at com.caucho.jsp.JavaPage.service(JavaPage.java:60) at com.caucho.jsp.Page.pageservice(Page.java:570) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179) at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:485) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:350) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:933) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:870) at org.apache.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:143) at org.apache.tiles.TilesUtil.doInclude(TilesUtil.java:149) at org.apache.tiles.taglib.InsertTag.doInclude(InsertTag.java:760) at org.apache.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:892) ... 36 more Caused by: javax.servlet.jsp.JspException: ServletException in '/pages/explore/type/instructable_content.jsp': java.lang.reflect.InvocationTargetException at org.apache.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:923) at org.apache.tiles.taglib.InsertTag.doEndTag(InsertTag.java:457) at _jsp._common._layout_0bootstraped__jspx._jspService(_layout_0bootstraped__jspx.java:210) ... 49 more Caused by: javax.servlet.ServletException: javax.servlet.jsp.el.ELException: java.lang.reflect.InvocationTargetException at com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java:1120) at _jsp._pages._explore._type._instructable_0body_0instructable_0bootstrapped__jsp._jspService(_instructable_0body_0instructable_0bootstrapped__jsp.java:199) at com.caucho.jsp.JavaPage.service(JavaPage.java:60) at com.caucho.jsp.Page.pageservice(Page.java:570) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179) at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:485) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:350) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:933) at _jsp._pages._explore._type._instructable_0body_0bootstrapped__jsp._jspService(_instructable_0body_0bootstrapped__jsp.java:43) at com.caucho.jsp.JavaPage.service(JavaPage.java:60) at com.caucho.jsp.Page.pageservice(Page.java:570) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179) at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:485) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:350) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:933) at _jsp._pages._explore._type._instructable_0content__jsp._jspService(_instructable_0content__jsp.java:32) at com.caucho.jsp.JavaPage.service(JavaPage.java:60) at com.caucho.jsp.Page.pageservice(Page.java:570) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179) at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:485) at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:350) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:933) at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:870) at org.apache.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:143) at org.apache.tiles.TilesUtil.doInclude(TilesUtil.java:149) at org.apache.tiles.taglib.InsertTag.doInclude(InsertTag.java:760) at org.apache.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:892) ... 51 more Caused by: javax.servlet.jsp.el.ELException: java.lang.reflect.InvocationTargetException at com.caucho.el.StaticMethodExpr.evalMethod(StaticMethodExpr.java:142) at com.caucho.el.FunctionExpr.evalObject(FunctionExpr.java:71) at _jsp._pages._explore._type._instructable_0body_0instructable_0bootstrapped__jsp._jspService(_instructable_0body_0instructable_0bootstrapped__jsp.java:48) ... 82 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor553.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.caucho.el.StaticMethodExpr.evalMethod(StaticMethodExpr.java:133) ... 84 more Caused by: java.lang.NullPointerException

Topic by mbhaworth    |  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  


How to get data from a load sensor through bluetooth module on an Android App/Arduino?

I am creating a mobile android application which gets data from a load sensor connected to HC-06 Bluetooth module and sends the data to a mobile application. The mobile app has two activities one for listing the bluetooth devices available and the other is the main activity to get data from the load sensor. I have managed to connect/pair with the Bluetooth module but I am unable to get data from it. The main activity consists of a button 'btnScan' that will get the data, and a text field to display the data. Can someone please help?  Here is the MainActivity File package com.uniproj.senseplate; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.UUID; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import android.widget.Toast;   public class MainActivity extends Activity {       Button btnscan;   TextView txtArduino, txtString, txtStringLength, calorie;   Handler bluetoothIn;   final int handlerState = 0;             //used to identify handler message   private BluetoothAdapter btAdapter = null;   private BluetoothSocket btSocket; //= null;   private StringBuilder recDataString = new StringBuilder();      private ConnectedThread mConnectedThread;       // SPP UUID service - this should work for most devices   private static final UUID BTMODULEUUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");     // String for MAC address   private static String address; @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       //Link the buttons and textViews to respective views                    btnscan = (Button) findViewById(R.id.scanBtn);                 txtString = (TextView) findViewById(R.id.txtString);     txtStringLength = (TextView) findViewById(R.id.testView1);       calorie = (TextView) findViewById(R.id.sensorView1);     bluetoothIn = new Handler() {         public void handleMessage(android.os.Message msg) {             if (msg.what == handlerState) {          //if message is what we want              String readMessage = (String) msg.obj;                                                                // msg.arg1 = bytes from connect thread                 recDataString.append(readMessage);              //keep appending to string until ~                 int endOfLineIndex = recDataString.indexOf("~");                    // determine the end-of-line                 if (endOfLineIndex > 0) {                                           // make sure there data before ~                     String dataInPrint = recDataString.substring(0, endOfLineIndex);    // extract string                     txtString.setText("Data Received = " + dataInPrint);                                 int dataLength = dataInPrint.length();       //get length of data received                     txtStringLength.setText("String Length = " + String.valueOf(dataLength));                                         if (recDataString.charAt(0) == '#')        //if it starts with # we know it is what we are looking for                     {                      //get sensor value from string between indices 1-5                      String weight = recDataString.substring(1, 5);                      //update the textviews with sensor values                      calorie.setText(weight + "kg");                            }                     recDataString.delete(0, recDataString.length());      //clear all string data                    // strIncom =" ";                     dataInPrint = " ";                 }                        }         }     };           btAdapter = BluetoothAdapter.getDefaultAdapter();       // get Bluetooth adapter     checkBTState();        // Set up onClick listeners for button to scan for data     btnscan.setOnClickListener(new OnClickListener() {       public void onClick(View v) {         mConnectedThread.read("1");       }     }); }   private BluetoothSocket createBluetoothSocket(BluetoothDevice device) throws IOException {             return  device.createRfcommSocketToServiceRecord(BTMODULEUUID);       //creates secure outgoing connecetion with BT device using UUID   }       @Override   public void onResume() {     super.onResume();         //Get MAC address from DeviceListActivity via intent     Intent intent = getIntent();         //Get the MAC address from the DeviceListActivty via EXTRA     address = intent.getStringExtra(DeviceListActivity.EXTRA_DEVICE_ADDRESS);     //create device and set the MAC address     BluetoothDevice device = btAdapter.getRemoteDevice(address);          try {         btSocket = createBluetoothSocket(device);     } catch (IOException e) {      Toast.makeText(getBaseContext(), "Socket creation failed", Toast.LENGTH_LONG).show();     }      // Establish the Bluetooth socket connection.     try     {       btSocket.connect();     } catch (IOException e) {       try       {         btSocket.close();       } catch (IOException e2)       {      //insert code to deal with this       }     }     mConnectedThread = new ConnectedThread(btSocket);     mConnectedThread.start();         //I send a character when resuming.beginning transmission to check device is connected     //If it is not an exception will be thrown in the write method and finish() will be called     //mConnectedThread.write("x");   }     @Override   public void onPause()   {     super.onPause();     try     {     //Don't leave Bluetooth sockets open when leaving activity       btSocket.close();     } catch (IOException e2) {      //insert code to deal with this     }   } //Checks that the Android device Bluetooth is available and prompts to be turned on if off   private void checkBTState() {     if(btAdapter==null) {      Toast.makeText(getBaseContext(), "Device does not support bluetooth", Toast.LENGTH_LONG).show();     } else {       if (btAdapter.isEnabled()) {       } else {         Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);         startActivityForResult(enableBtIntent, 1);       }     }   }     //create new class for connect thread   private class ConnectedThread extends Thread {         private final InputStream mmInStream;         @SuppressWarnings("unused")   private final OutputStream mmOutStream;               //creation of the connect thread         public ConnectedThread(BluetoothSocket socket) {          btSocket = socket;             InputStream tmpIn = null;             OutputStream tmpOut = null;             try {              //Create I/O streams for connection                 tmpIn = socket.getInputStream();                 tmpOut = socket.getOutputStream();             } catch (IOException e) { }                   mmInStream = tmpIn;             mmOutStream = tmpOut;         }                 public void run() {             byte[] buffer = new byte[1024];              int bytes;             // Keep looping to listen for received messages             while (true) {                 try {                     bytes = mmInStream.read(buffer);                     bluetoothIn.obtainMessage(handlerState, bytes, -1, buffer).sendToTarget();                 } catch (IOException e) {                     break;                 }             }         }                 //write method         public void read(String input) {             byte[] bytes = input.getBytes();//converts entered String into bytes             try {                 mmInStream.read(bytes);//write bytes over BT connection via outstream             } catch (IOException e) {               //if you cannot write, close the application              Toast.makeText(getBaseContext(), "Connection Failed", Toast.LENGTH_LONG).show();              finish();                            }          }      } } Here is the Arduino file #include int led = 13; int button = 12; LiquidCrystal lcd(9, 8, 4, 5, 6, 7); // Pins used for inputs and outputs******************************************************** float sensorValue1; float containerValue; char inbyte = 0; int flag; const int numReadings = 50; int readings[numReadings]; int index = 0; int total = 0; int average = 0; //******************************************************************************************* void setup() {     pinMode(led, OUTPUT);   digitalWrite(led, HIGH);   Serial.begin(9600);     for (int thisReading = 0; thisReading < numReadings; thisReading++)   {       readings[thisReading] = 0;   }     lcd.begin(16, 2); //change to 16, 2 for smaller 16x2 screens   lcd.clear();   lcd.print("hello, world!");   delay (1000);   lcd.clear();   delay (500); } void loop() {   digitalWrite(led, HIGH);   readSensor2();    //DONE       printLCD();       //DONE   return; sendAndroidValues();   //when serial values have been received this will be true   if (Serial.available() > 0)   {     inbyte = Serial.read();     if (inbyte == '0')     {       //LED off       digitalWrite(led, LOW);     }     if (inbyte == '1')     {       //LED on       digitalWrite(led, HIGH);     }   }     //delay by 2s. Meaning we will be sent values every 2s approx   //also means that it can take up to 2 seconds to change LED state   delay(2000); void readSensor2() {   total = total - readings[index];     readings[index] = analogRead(A0);     total = total + readings[index];     index = index + 1;     if (index >= numReadings)   {      index = 0;   }     average = total / numReadings;        //sensorValue1 = (analogRead(A0) - 330)* i;    //delay(200);         Serial.println(average);    delay(100);          if( digitalRead(button) == HIGH && flag == 1)   {     flag = 0;     containerValue = 0;      }   else if (digitalRead(button) == HIGH && flag != 1) {   flag = 1;                        //when the button is pressed the initially sesnsor     containerValue = sensorValue1;      delay(10);   }     //Serial.println(digitalRead(button));    delay (1000);    } //sends the values from the sensor over serial to BT module void sendAndroidValues() {   //puts # before the values so our app knows what to do with the data Serial.print('#');   //for loop cycles through 4 sensors and sends values via serial   Serial.print(sensorValue1);   Serial.print('+');     //technically not needed but I prefer to break up data values     //so they are easier to see when debugging Serial.print('~'); //used as an end of transmission character - used in app for string length Serial.println(); delay(5000);        //added a delay to eliminate missed transmissions } void printLCD() {   lcd.setCursor(4, 0);   lcd.print("   GRAMS    ");   lcd.setCursor(4, 1);   lcd.print(sensorValue1); }

Question by AyoS1    |  last reply