Premium Code

I received a code for a premium Teacher membership.  I have entered the code and logged in, but when I go to download it says I need to upgrade to premium.  Help!

Posted by Zilhaver01 1 year ago  |  last reply 1 year ago


Arduino Code?

I would like to understand this piece of Arduino code.             " delay(300L * 1000L); // 5 minutes. This can be changed to change increments " This is supposed to be a 5 min time period. 1000 = 1 second. 60 sec per min. 300 sec / 60.   Calculates by 300 / 60 = 5 minutes. What is the  " L " supposed to do? What does it represent?

Asked by WWC 6 years ago  |  last reply 6 years ago


Arduino Code?? Answered

I have created a code for the arduino breathalyzer and I wat to confirm that will it work properly so please someone who's good with this can do this for me.And yes the code compiles successfully but will it work as expexted.It should light up some of the 7 LEDs according to how much you drink.It also has a pot to calibrate the sensor and i will be using a MQ-3 alcohol sensor. here is the code: const int analogPin = 0;    // the pin that the potentiometer is attached to const int ledCount = 7;    // the number of LEDs in the bar graph int ledPins[] = { 7,6,5,4,3,2,1 // Here we have the number of LEDs to use in the BarGraph   };   void setup() {   for (int thisLed = 0; thisLed < ledCount; thisLed++) {     pinMode(ledPins[thisLed], OUTPUT);   }} void loop() {   //This is the code to light up LED's   int sensorReading = analogRead(analogPin);   int ledLevel = map(sensorReading, 500, 1023, 0, ledCount);   for (int thisLed = 0; thisLed < ledCount; thisLed++) {     if (thisLed < ledLevel) {       digitalWrite(ledPins[thisLed], HIGH);     }     else {       digitalWrite(ledPins[thisLed], LOW);     }  }}

Asked by Bot1398 6 years ago  |  last reply 6 years ago


HEX code?

Heres the asm file that i was trying to convert into HEX file but i was getting many errors by this software MPLAB IDE  Heres the asm file  https://www.instructables.com/id/3x3x3-LED-Cube/step2/The-software/  the code is in the zip file

Asked by robot1398 7 years ago  |  last reply 7 years ago


Arduino code Answered

Hello, I have been trying to make code for my arduino. I would like code to tell my arduino to receive a servo signal from my rc receiver, then detect whether the signal is telling the esc to move forwards or backwards. If the signal is forwards, it simply relays that code to the ESC. If the signal tells the ESC to go backwards, then it sends a signal to go forwards at the speed it would have gone in reverse, while sending out a power source to power a relay. Chowmix12 came up with some code that may help and I put  "//" before all of the code that was not needed for his application to work. Also, this link may be helpful for multitasking.  #include Servo ThrottleServo; //int PWMpin = 2; // connect RC receiver here. //int ServoVal; //int RCinput; void setup() { //Serial.begin(9600); //ThrottleServo.attach(9); // attaches the servo on pin 9 to the servo object //ThrottleServo.write(97); // go to nuetral pinMode(13, OUTPUT); } void loop() { //RCinput = pulseIn(PWMpin, HIGH, 20000); //ServoVal = map(RCinput, 520, 2370, 0, 180); //if(RCinput== 0) { // Signal timed out! digitalWrite(13, HIGH); // ALERT! ThrottleServo.write(97); // Go to neutral throttle position } //else{ // digitalWrite(13, LOW); // everything's fine. // ThrottleServo.write(ServoVal); // Repeat the data to the truck's ESC // Serial.print(" PulseMicros "); // This part is used to debug the values for calibration // Serial.print(RCinput); //Serial.print(" ServoRead "); // Serial.println(ServoVal); // } //} My program so far is as follows. /* created 2005 by David A. Mellis and chowmix12 modified by Justin Baker */ #include const int relay =  10; Servo ThrottleServo; int ServoVal; int RCinput; int PWMpin=2; int relayState = LOW;       long previousMillis = 0;    long interval = 1000;          void setup() {   pinMode(relay, OUTPUT);  Serial.begin(9600); pinMode(9, OUTPUT);  } void loop() { RCinput = pulseIn(PWMpin, HIGH, 20000); ServoVal = map(RCinput, 520, 2370, 0, 180); if(ServoVal>90) { digitalWrite(9, HIGH); ThrottleServo.write(ServoVal); } else{ ServoVal=180-ServoVal; digitalWrite(9, HIGH); ThrottleServo.write(ServoVal); }   unsigned long currentMillis = millis();   if(currentMillis - previousMillis > interval) {        previousMillis = currentMillis;       if (ServoVal >= 90)       relayState = LOW;     else       relayState = HIGH; //this output will turn a mosfet off, turning the relay off       digitalWrite(relay, relayState);   } }

Asked by jbaker22 4 years ago  |  last reply 4 years ago


verilog code ?

I have made sample code for 4 bit ALU and 3 to 8 decoder to make 4 bit processor . as designer we can design anything so I have started to design processor with two function ALU and decoder 4 bit alu Module alu (a,b,s0,s1,s2 f); Input a,b,s0,s1,s2; Output f; Reg [3:0]; Always @(s0,s1,s2); Begian Case (s0,s1,s2); 3b’000 :f=(a&b;); 3b’001:f= (a|b); 3b’010 :f= ~(a&b;); 3b’011 :f= ~ (a|b); 3b’100:f=(a^b); 3b’101: f=(a*b); 3b’110: f=(a+b); 3b’111:f=(a-b ); End case End module 3to 8 decoder Module decoder (a2,a1,a0, d7,d6,d5,d4,d3,d2,d1,d0); Input a2,a1,a0; Output d7,d6,d5,d4,d3,d2,d1,d0; Wire [7:0]; Always @(a2,a1,a0); Begin Case (a2,a1,a0); 4’b000:( d7,d6,d5,d4,d3,d2,d1,d0)=00000001; 4’001: (d7,d6,d5,d4,d3,d2,d1,d0)=00000010; 4’b010: (d7,d6,d5,d4,d3,d2,d1,d0)=00000100; 4’b011: (d7,d6,d5,d4,d3,d2,d1,d0)=00001000; 4’b100:( d7,d6,d5,d4,d3,d2,d1,d0)=00010000; 4’b101:( d7,d6,d5,d4,d3,d2,d1,d0)=00100000; 4’b110: (d7,d6,d5,d4,d3,d2,d1,d0)=01000000; 4’b111: (d7,d6,d5,d4,d3,d2,d1,d0)=10000000; Endcase Endmodule I don't understand how to connect 4 bit Alu with     3 to 8 bit decoder to make 4 bit processor    

Asked by vead 4 years ago  |  last reply 4 years ago


what is the capacitor code?

I have a green capacitor that has the code, .22k 100sc What is the value in uf?

Asked by madman11 9 years ago  |  last reply 9 years ago


Arduino dimmer code

I am creating a 6 channel light dimmer system using an arduino duemilanove. I want to control it using push buttons to  dim and brighten. I want to setup 6 buttons to corresponding to the 6 channels. Then I want an up, down, and on/off button. When you hold down a channel button, it activates to up and down button to control that channel. I want the on/off button to turn all channels to full brightness or completely off. I am basing the dimming part of the circuit off of this instructable: https://www.instructables.com/id/Arduino-Powered-Musical-Christmas-Lights/. Anyway, I have ordered an arduino but want someone to check out my code before I build this. I have made many things but am new to writing my own code so I would appreciate any improvements and friendly advice. Here is the code: int light1pin=3; int light2pin=5; int light3pin=6; int light4pin=9; int light5pin=10; int light6pin=11; int button1pin=0; int button2pin=1; int button3pin=2; int button4pin=4; int button5pin=7; int button6pin=8; int uppin=12; int downpin=13; int onoffpin=14; int onoff=0; int light1=255; int light2=255; int light3=255; int light4=255; int light5=255; int light6=255; int interval=1; void setup() {   pinMode(light1pin, OUTPUT);   pinMode(light2pin, OUTPUT);   pinMode(light3pin, OUTPUT);   pinMode(light4pin, OUTPUT);   pinMode(light5pin, OUTPUT);   pinMode(light6pin, OUTPUT);   pinMode(button1pin, INPUT);   pinMode(button2pin, INPUT);   pinMode(button3pin, INPUT);   pinMode(button4pin, INPUT);   pinMode(button5pin, INPUT);   pinMode(button6pin, INPUT);   pinMode(uppin, INPUT);   pinMode(downpin, INPUT);   pinMode(onoffpin, INPUT); } void loop() {   analogWrite(light1pin, light1);   analogWrite(light2pin, light2);   analogWrite(light3pin, light3);   analogWrite(light4pin, light4);   analogWrite(light5pin, light5);   analogWrite(light6pin, light6);   if (digitalRead(onoffpin) == HIGH && onoff == 0){     light1=255;     light2=255;     light3=255;     light4=255;     light5=255;     light6=255;     onoff=1;   }   if (digitalRead(onoffpin) ==  HIGH && onoff == 1) {     light1=0;     light2=0;     light3=0;     light4=0;     light5=0;     light6=0;     onoff=0;   }   if (digitalRead(button1pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light1 < 255){       light1 = light1 + interval;     }     if (digitalRead(downpin) == HIGH && light1 > 0){       light1 = light1 - interval;     }   }   if (digitalRead(button2pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light2 < 255){       light2 = light2 + interval;     }     if (digitalRead(downpin) == HIGH && light2 > 0){       light2 = light2 - interval;     }   }   if (digitalRead(button3pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light3 < 255){       light3 = light3 + interval;     }     if (digitalRead(downpin) == HIGH && light3 > 0){       light3 = light3 - interval;     }   }   if (digitalRead(button4pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light4 < 255){       light4 = light4 + interval;     }     if (digitalRead(downpin) == HIGH && light4 > 0){       light4 = light4 - interval;     }   }   if (digitalRead(button5pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light5 < 255){       light5 = light5 + interval;     }     if (digitalRead(downpin) == HIGH && light5 > 0){       light5 = light5 - interval;     }   }   if (digitalRead(button6pin) == HIGH) {     if (digitalRead(uppin) == HIGH && light6 < 255){       light6 = light6 + interval;     }     if (digitalRead(downpin) == HIGH && light6 > 0){       light6 = light6 - interval;     }   } }

Posted by bmrodgers3365 6 years ago  |  last reply 6 years ago


if/else Arduino code

So I need a little help building some if/else statements. I went to the Arduino website but there wasn't a whole lot of information there. I need some help with reading analog input and reacting to them. I'm not totally sure how to use the == either, I know it means do something if one thing is equal to, but. . . Also, with the if/else, I need some help with using >= => (i think??) as well as true and false. I also think you can like use two different if statements and only one else. Could I get a little assistance from you guys!? Here's an example: if(analog_in (is less than) 5) {  do something here  } else {  do another thing here } Here's another example: if(analog_in (is equal to, I think ==) 5); {   analogWrite(LED, 100); } if(analog_in (is greater than) 5); { analogWrite(LED, 255); } if(analog_in (is less than 3, but greater than 1); {  analogWrite(LED, 50); } and if none of that is true, then do this else {  digitalWrite(LED, LOW); } So you can see I need some help!  Thanks!

Posted by HavocRC 5 years ago  |  last reply 2 years ago


Directx error code?

I recently downloaded the Just Cause 2 demo off of Steam. When I try to run it I get this message: Fatal Directx Error! Code: 15 Result: 0x80070057: E_INVALIDARG I have Directx 11. How do I fix this?

Asked by General Eggs 7 years ago  |  last reply 7 years ago


Mach3 not following code? Answered

I am trying to mill PCBs, but when i do so, some traces vanish because the cnc moves along the same y-coordinate twice instead of leaving a trace. its always the same traces and only some of them. Does anyone know what's going on?

Asked by jg156 4 years ago  |  last reply 4 years ago


Arduino code help

Hey guys first post.  I need some help with some code Im working on. What I want to do is have a pot controlled timer that moves a servo after a time dictated by the pot. The scale of delays I want is 0-3 minutes.  I eventually want to program an Attiny85 chip to do this. For now Im substituting a led in for the servo. Im a newbie with Arduino so any help with this simple project would be greatly appreciated. This is my code:  int sensorPin = 0;    // select the input pin for the potentiometer int ledPin = 13;      // select the pin for the LED int sensorValue = 0;  // variable to store the value coming from the sensor void setup() {     pinMode(ledPin, OUTPUT);    int val = analogRead(0);     val = map(val, 0, 1023, 0, 30000);       digitalWrite(ledPin, HIGH);       delay(val); delay(val); delay(val); delay(val); delay(val); delay(val);           digitalWrite(ledPin, LOW);                         } void loop() {                   }

Posted by Steven Wrigley 5 years ago  |  last reply 3 years ago


Convert "C" code in to hex

Hello I want to built this binary watch but the code is in "C" here is code and i dont know to programm with this kind of code,cam someone convert the code in to hex please,and the micrchip is PIC16F688.

Asked by macobt 8 years ago  |  last reply 8 years ago


Need help with arduino code.?

Alright I asked this question on the arduino forums but nobody is giving me a straight answer, and it's getting annoying. I am using the capsense library on an attiny85, I want to count the number of times an even happens, in this case the capacitive censor exceeding a certain amount. Then based on that number I want it to turn on one led, or two, and so forth, to keep count. Can someone tell me how the f*****g get this to work? I try to use serial to debug and just get "Serial" not defined in this scope. Heres the code: #include #include CapacitiveSensor   cs_1_2 = CapacitiveSensor(1,2);        // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired int ledpin = 0; int countnumber = 0; void setup()                    {   cs_1_2.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example   pinMode (ledpin, OUTPUT); } void loop()                    {   long start = millis();   long total1 =  cs_1_2.capacitiveSensor(30);   if (total1 < 99) {    countnumber == 1;   }   if (countnumber = 1) {     digitalWrite(ledpin, HIGH);   } }

Asked by XOIIO 5 years ago  |  last reply 9 months ago


Arduino Blink Code help?

I have just started learning the arduino. I have also started to learn basic C so I am familiar with for,while loops,etc.  I'm working on a circuit that when triggered using a pusbutton, an LED blinks 5 times with a 1 second delay between each state and then switches off until triggered again. I need help in writing the code.

Asked by Jonathanrjpereira 3 years ago  |  last reply 3 years ago


robot bumper code for arduino?

I have a two wheeled robot with three bumpers and 5 ir sensors. I have completed my code to run the motors. I'm new to this it took four weeks to get where I am. I don't know how to add the avoidence code to make the robot stop and turn when faced with an object. Can anyone help me add this feature? The robot is a DFrobot HCR The microcontoller is the Arduino Romeo All in One 328 My code is working but maybe not so good. I am open to suggestions. Here is my code:  int E1 = 5; int E2 = 6; int M1 = 4; int M2 = 7; void forward(char a,char b) //Move forward { analogWrite(E1,a); digitalWrite(M1,HIGH); analogWrite(E2,b); digitalWrite(M2,HIGH); } void stop(void) //Stop { digitalWrite(E1,LOW); digitalWrite(E2,LOW); } void backward (char a,char b) //Move backward { analogWrite (E1,a); digitalWrite(M1,LOW); analogWrite (E2,b); digitalWrite(M2,LOW); } void Left (char a,char b) //Turn left { analogWrite (E1,a); digitalWrite(M1,LOW); analogWrite (E2,b); digitalWrite(M2,HIGH); } void Right (char a,char b) //Turn right { analogWrite (E1,a); digitalWrite(M1,HIGH); analogWrite (E2,b); digitalWrite(M2,LOW); } void setup() { for(int i=4;i<=7;i++) pinMode(i, OUTPUT); } void loop() { forward(100,100); //Forward at 50% full speed delay(10000); //delay for 10 seconds stop(); //Stop delay(6000000); //delay for 1 hour backward(100,100); //backward at 50% full speed delay(10000); //delay for 10 seconds stop(); //Stop delay(6000000); //delay for 1 hour Left(100,100); //Left at 50% full speed delay(10000); //delay for 10 seconds stop(); //Stop delay(6000000); //delay for 1 hour Right(100,100); //Left at 50% full speed delay(10000); //delay for 10 seconds stop(); //Stop delay(6000000); //delay for 1 hour }

Asked by Moses58 7 years ago  |  last reply 7 years ago


remote code for curtis tv?

I have a curtis LEDVD1975A-2 tv that I got for christmas. I have it hooked up with my comcast digital converter and the little remote with it. I am trying to calibrate it or whatever so I can control the power and volume of the tv with the comcast remote. The instructions for my remote say to hold the set button until the light blinks twice, then enter the 5 digit code. Well, the code the manual for the tv says is 2295. Only 4 digits. It doesnt work. Comcast does have a thing that gives you codes other people have used but none of them have worked for me yet. They say 11326 and 11531. Here is the link to the thing I am trying to use to get codes. http://www.urcsupport.com/html.php?page_id=426

Asked by TOCO 7 years ago  |  last reply 3 years ago


TV-B-Gone Codes?

Hi, So I was wondering if anyone had the TV-B-Gone codes in a .wav or .mp3 format so that I could use them on my ipod like this.Anyone have any idea were to get them or how to get them?Thanks

Posted by joejoerowley 10 years ago  |  last reply 6 years ago


Arduino Morse Code decoder?

I want to make an arduino morse code decoder, which will print the result on a 16x2 LCD. The input will be 3 button, 2 will be the "_" and "." respectively, the 3rd one will be the "space" button, when press will decode the code which was input. If input was wrong then it will display a "?" mark. And it should be able to decode many character at once. Anyone have some idea or code about this? I'm just getting started with microcontroller for about 1 months so I have a bit of knowledge about how they should work, but this prove to be quite challenging for me

Asked by Mad Fox 4 years ago  |  last reply 4 years ago


I need arduino code help.

I want to do arduino time relay with RTC and LCD, but i have problems with the code. This is my code: #include "Wire.h" #define DS1307_ADDRESS 0x68 #include byte zero = 0x00; LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int rele=7; #define DS1307_I2C_ADDRESS 0x68  #define STA_HOUR 16 #define STA_MINUTE 15 #define STA_SECOND 0 #define END_HOUR 16 #define END_MINUTE 17 #define END_SECOND 0 void setup(){   Wire.begin();   Serial.begin(9600);   setDateTime(); lcd.begin(16, 2); pinMode(rele,OUTPUT); } void loop(){   printDate();   delay(1000);   lcd.begin(16, 2); } void setDateTime(){   byte second =      0; //0-59   byte minute =      13; //0-59   byte hour =        16; //0-23   byte weekDay =     2; //1-7   byte monthDay =    2; //1-31   byte month =       8; //1-12   byte year  =       13; //0-99   Wire.beginTransmission(DS1307_ADDRESS);   Wire.write(zero);   Wire.write(decToBcd(second));   Wire.write(decToBcd(minute));   Wire.write(decToBcd(hour));   Wire.write(decToBcd(weekDay));   Wire.write(decToBcd(monthDay));   Wire.write(decToBcd(month));   Wire.write(decToBcd(year));   Wire.write(zero);   Wire.endTransmission(); } byte decToBcd(byte val){   return ( (val/10*16) + (val%10) ); } byte bcdToDec(byte val)  {   return ( (val/16*10) + (val%16) ); } void printDate(){     Wire.beginTransmission(DS1307_ADDRESS);   Wire.write(zero);   Wire.endTransmission();   Wire.requestFrom(DS1307_ADDRESS, 7);   int second = bcdToDec(Wire.read());   int minute = bcdToDec(Wire.read());   int hour = bcdToDec(Wire.read() & 0b111111);   int weekDay = bcdToDec(Wire.read());   int monthDay = bcdToDec(Wire.read());   int month = bcdToDec(Wire.read());   int year = bcdToDec(Wire.read());     lcd.print(monthDay);   lcd.print("/");   lcd.print(month);   lcd.print("/");   lcd.print(year);   lcd.print(" ");   lcd.print(hour);   lcd.print(":");   lcd.print(minute);   lcd.print(":");   lcd.println(second);} if (minute = STA_MINUTE && hour = STA_HOUR) { digitalWrite(rele,HIGH); } if (minute = END_MINUTE && hour = END_HOUR) { digitalWrite(rele,LOW); } The errors : chasovnik_lcd:104: error: expected unqualified-id before 'if' chasovnik_lcd:108: error: expected unqualified-id before 'if'

Asked by inaydenov1 5 years ago  |  last reply 5 years ago


can i get a good source code that sends commands from the parallax transmitter and receiver?

Im having trouble writing source code for the transmitter and receiver so where they send commands and receive them to operate from a distance

Asked by poop#1 9 years ago


c++ code hElp?

This is the code for mobile operated robot found from this site can somebody explain this code i didnt understand  the line which is Italic and Bold like this (DDRD=0xff;  DDRB=0×00) somebody plz tell me what the lines are CODE /* DTMF Controlled Robot PORTD pin 0,1,2,3 goes to motor driver l293d PORTB pin 0,1,2,3 is connected to output of CM8870 DTMF decoder IC */ #include #include int main(void) { DDRD=0xff; DDRB=0×00; while(1) { switch(PINB&0b00001111) { case 0b0010://Key 2 { PORTD=0x0A ;      //1010 both motor front continue; } case 0b0100://Key 4 { PORTD=0×02;    //0010 right motor front continue; } case 0b0101://Key 5 { PORTD=0x0F;//1111 SUDDEN STOP continue; } case 0b0110://Key 6 { PORTD=0×08;  //1000 left motor front continue; } case 0b1000://Key 8 { PORTD=0×05; continue; } default: continue; } }//end of switch return 0; } // // // //

Asked by agent555 4 years ago


What library is LTask.h in ?

I am getting atal error: LTask.h: No such file or directory

Asked by hsedidin 1 year ago  |  last reply 1 year ago


How do I fix my java code to print out the correct thing?

Hello I am working on homework and I am trying to figure out what is wrong with my code so that it will print correctly. Write a Java program that prompt the user for the day and month (both integers) of his or her birthday, and then prints the appropriate astrological sign. public class Horoscope { public static void main(String args [] ) { String birthday = System.console().readline("Enter your birthday, month then day."); float value = Float.parseFloat(birthday); if (month < 1 || month > 12) {   System.out.println("Invalid month please try again."); } else if (day < 1 || day > 31) {   System.out.println("Invalid day please try again."); } else if (month = 1 || month = 12) {    } else if (day >= 22 || day <= 19); {    System.out.println(birthday + "Capricorn");   } } }

Asked by bubbles92 3 years ago  |  last reply 3 years ago


security system (not responding after combining ultrasonic sensor code and esp8266 code )

The base of this project is https://www.instructables.com/id/SIMPLE-ARDUINO-ULTRASONIC-SENSOR-DOOR-ALARM-/ &http;://randomnerdtutorials.com/door-status-monitor-using-the-esp8266/ I changed according to my uses from above links I tryed by dividing into two parts one for ultrasonic sensor and other for esp8266 they worked fine while separating ultrasonic and buzzer are working in (Tools and wifi module is working in onlt(Tools when i mix ultrasonic and buzzer nothing happening) any idea here is the code #include #include #include #include #define USE_SERIAL Serial #define trigPin 9 #define echoPin 10 #define piezoPin 8 ESP8266WiFiMulti WiFiMulti; int normalDistance; boolean triggered = false; long duration, distance; void setup() {   USE_SERIAL.begin(115200);   pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);   pinMode(piezoPin, OUTPUT);   long duration, distance; while (millis() < 5000) {   digitalWrite(piezoPin, HIGH);       digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2;         normalDistance = distance;       USE_SERIAL.print("Distance: "); USE_SERIAL.println(distance);         digitalWrite(piezoPin, LOW);    for(uint8_t t = 4; t > 0; t--) {         USE_SERIAL.printf("[SETUP] WAIT %d...\n", t);         USE_SERIAL.flush();         delay(1000); } WiFiMulti.addAP("username", "pass"); } } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2; USE_SERIAL.print("Distance: "); USE_SERIAL.println(distance); if (distance < normalDistance-5) {       triggered = true;     }     else {         triggered = false;     }     if (triggered) {     tone(piezoPin, 635);     delay(500);     tone(piezoPin, 912);     delay(250);     if((WiFiMulti.run() == WL_CONNECTED)) {         HTTPClient http;         USE_SERIAL.print("[HTTP] begin...\n");                 http.begin("iftt link.........................."); //HTTP         USE_SERIAL.print("[HTTP] GET...\n");         // start connection and send HTTP header         int httpCode = http.GET();         // httpCode will be negative on error         if(httpCode > 0) {             // HTTP header has been send and Server response header has been handled             USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);             // file found at server             if(httpCode == HTTP_CODE_OK) {                 String payload = http.getString();                 USE_SERIAL.println(payload);             }         } else {             USE_SERIAL.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());         }         http.end();     }     } } any idea about whats going on Thanks Hemanth

Posted by hemanth kumar reddy 1 year ago  |  last reply 1 year ago


What is the code to activate an RC soda machine?

There is an RC machine in my school that they actually keep stocked with soda and it turns on after school hours i need to know if there is a "password" button combination to unlock it early.

Asked by ProfessorStein 8 years ago  |  last reply 8 years ago


Can anyone please give me code to detect speed and display on LCD using I2C interface?

   I have a speed sensor which gives 8 pulse per revolution of wheel. I want to calculate the speed of the wheel and display it on an LCD using I2C interface. The LCD interface works fine and I can print anything on it. But I do not know the code to calculate the speed and display it on LCD.   Please help me and share with me a code that will calculate the speed based on 8 pulses/rev and display the speed on my LCD.

Asked by edifiedsprit 6 years ago  |  last reply 6 years ago


Giving away pro codes

So, I've given away a few pro membership codes recently. When they are used by the recipients, do they automatically disappear from the list of unredeemed codes on my own "pro settings" page? The reason I ask is because I forgot to note down which codes I sent ...

Posted by Kiteman 7 years ago  |  last reply 7 years ago


Posting formatted code

How do I post properly formatted code with the new editor ? The old one accepted Arduino format cut/paste, the new one mangles it completely. Steve

Posted by steveastrouk 3 years ago  |  last reply 3 years ago


Free Pro membership

A friend sends me a code to upgrade to Pro for a time...where do I enter this code?

Posted by mprelle 6 years ago  |  last reply 6 years ago


Bug in code formatting

When I add some sourcecode, select it and format it as code from the dropdown menu, it looks all right. But when I later change something in my Instructable, the code gets messed up and I have to write the whole block again. It's really annoying :(

Posted by metanurb 4 years ago  |  last reply 4 years ago


How do I include code in my instructable and not have it autoformatted? Answered

I have included code in my instructables before using the Trac wiki markup.  Now when I revisit those pages my code is unreadable as either a block of text or just one line that scrolls out to infinity.  How do I fix this so that my included code actually looks good.

Asked by natantus 9 years ago  |  last reply 9 years ago


How do I make a code box in an Instructables? Answered

Hi, How do i make a code box when making an Instructable, because i am making an Instructable and without it it looks really bad?

Asked by Jacoby Yarrow 3 years ago  |  last reply 3 years ago


How to post Arduino code with pointy braces ()

The Arduino code in my instructable contains '#include < AFMotor >' . The , which keeps disappearing when I hit 'save', I guess it is interpreted as a tag. I have tried &lt; / &gt; but without success. Thanks, R 

Posted by landmanr 8 years ago  |  last reply 7 years ago


how to convert a batch file in to exe file..? Answered

Asked by code source 6 years ago  |  last reply 6 years ago


How to Post Code in the Editor

Could someone please help me. Please show me the correct way to post code in an "ible". I have seen where some people post it in its own box. I would like to be able to do that, Im just not sure how.

Posted by MakrToolbox 1 year ago  |  last reply 1 year ago


Arduino time base servo sweep code help

Hi,     I need help on creating arduino code for a time base sweeping servo. Specifically i would like to have my servo sweep 180 degrees and back to center every 20 minutes and repeat indefinably. Im sure its a fairly simple code but just new at coding in general I have looked at servo sweep code sample in the arduino library but I dont know how to implement it with a timer. Hope someone can help me out. thanks for your time uno r3, micro servo 99

Posted by jaysond04 2 years ago


what's this programming code language? Answered

i found a code for a pic16f28A it's simple: main:  lablel0:   switch off 3   switch on 0   pause 1000   switch on 1   switch off 0   pause 1000   switch on 2   switch off 1   pause 1000   switch on 3   switch off 2   goto label0

Asked by top.boy 7 years ago  |  last reply 7 years ago


Arduino Code?

I have a simple problem that I could not solve for days. I am trying to write a code that takes an input from Serial Communication port such as: "00aaaaaaa12dddddddd23vvvvvvvvvvvv" and divides into one string matrix and one array such as String[] = {"aaaaaaa","dddddddd","vvvvvvvvvvvv"} int Array[] = {0,12,23} //2-digit int numbers Thank you for you help

Asked by giray123 5 years ago  |  last reply 5 years ago


Aduino Bluetooth code problem!

I am building a Morse Code machine with bluetooth functuonality.  It is in the early stages at the moment but I have hit a problem. My code uses a button to input Morse code which is displayed on an LCD and flashes an LED on pin 5, but also incorporates a bluetooth HC05 which controls an LED on pin 13. Seperately, they work fine but I wanted to merge the two sketches. I have succeeded but for one small problem. When pressing the LED 'ON' button on my android app, the LED only comes on after the Morse code button has been pressed. And it works the same way for the LED 'OFF' function on the app. Press it, then press the Morse code button and the LED switches off again. This repeats. I cannot figure out why this button is controlling the Bluetooth LED command signal. I have changed baud rates of the bluetooth but to no joy. I have attached my code. Can anyone help me solve this problem?!?

Posted by Satans Thong 2 years ago


pid control motor using arduino

Hi forum I have problem i done my pid  code using arduino but the output value shows 0 or constant 250.Need your help,I attached the code. thank you

Posted by satya_82 4 years ago


Arduino code: download problem

Hi all. I don't know if it is a problem just to me, but in 90%  of times I try to download some arduino sketch related to some instructable (file.ino) the link will open an html page with all the code written continuosly, with no line breaks... every time I have to pass a lot of time writing back the code in the proper sintax. I try even by right click>save as... but no way (it will save an html page) There's some problem with my browser (?!?!) and in case how to fix it ? Or it is a common problem? Any way to fix it? Thanks Andrea

Asked by jocman 3 years ago  |  last reply 3 years ago


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

Posted by goldenshuttle 3 years ago  |  last reply 11 days ago


IF STATEMENT BATCH CODE CMD

Hi! I'm new in batch coding using cmd. I need help. My teacher gave me an exercise where once you put a grade it will show the equivalent standing of that grade: 91-100 - excellent 81-90 -Very Satisfactory 71-80 - Satisfactory 61-70 - Very Good 51-60 - Good 0-50 - Failed ******************* Now I tried the code if %num% GRT 91 echo Excellent If %num% LSS 50 echo Failed But the problem is I don't know how to do with the rest. As per my teacher there's no code such as '<=' or '>=' there are other activities with such problem. I just need to know how to figure this one out then I will be able to to do the rest. Please help me.

Posted by maakuasa 1 year ago  |  last reply 1 year ago


control dc motor using pid processing and arduino

Hi forum I done code for pid to control dc motor speed but the output value gives 0 or constant value 250 and the set point is still same 100.Hereby I attach the PID code.

Posted by satya_82 4 years ago  |  last reply 2 years ago


Arduino Code Modification Help (Change of Display Type Used)

This is my first post, so I hope I'm doing this correctly. For reference, I'm new to Arduino, and with no experience with code. I want to try and do a battery tester with an Uno, as seen here (http://denishennessy.com/2012/04/08/measuring-battery-capacity-with-an-arduino/). I'm trying to follow the instructions given, and use the code (https://github.com/dhennessy/BatteryCapacityTester/blob/master/BatteryTester/BatteryTester.ino) that the author has provided. However, due to lack of availability of parts, I don't have a temperature sensor, and instead of the 16x2 LCD screen, I have an Adafruit 1.8' TFT shield. So my query is, how can I modify the code such that it works on this type of display? Again, the code is from (https://github.com/dhennessy/BatteryCapacityTester/blob/master/BatteryTester/BatteryTester.ino), and I have not directly copied it in the post so that it is easier to read. Any help on this would be greatly appreciated.

Posted by f-nine 5 years ago  |  last reply 5 years ago


How long will the discount code work for?

How long can you use the discount code for? I have a big wishlist I'm planning on buying in may (utilizing birthday money), and if I don't win the contest, I would like to know if I can still wait until may to buy the stuff. EDIT: I was under the assumption that the "add a new topic" button would add a new topic to the contest, not just the forums. I was talking about the april fools day contest.

Posted by codongolev 8 years ago  |  last reply 8 years ago


Can You read this? - No cheating!

-- --- .-. ... . / -.-. --- -.. . / .. ... / --. .-. . .- - .-.-.- / -. .. -.-. . / .--- --- -... .-.-.- / -.. --- -. .----. - / --. .. ...- . / .- .-- .- -.-- / - .... . / .- -. ... .-- . .-.

Asked by FrodoandSam 6 years ago  |  last reply 6 years ago


How do you embed a text box in an instructable for arduino code? Answered

I am writing an instructable that uses an Arduino micro controller and I wanted to include the code in a text box scrolling text box. But I can't find anywhere that tells how to embed a textbox in an instructable. Could someone point me in the right direction.

Asked by DIY Hacks and How Tos 6 years ago  |  last reply 5 years ago


Wanta make something

Does someone have a rig going? What are you using it for? What software are you using to generate g-code? What controller software are you using?

Posted by servant74 10 years ago  |  last reply 10 years ago