Coding?

I am trying get a hold of the program coding for wow. been looking everywhere, on google and youtube. theres nothing. anyone know where i can grab hold of the coding for wow?

Question by titansuki   |  last reply


code? Answered

Heres the code for flashing SOS in morse code on output pin 4 with a piAxe microcontroller so please verify the code if there are some mistakes that i made plzzz help me out. main: high 4 pause 1000 low 4 pause 1000 high 4 pause 1000 low 4 pause 1000 high 4 pause 1000 low 4 pause 1000 high 4 pause 3000 low 4 pause 1000 high 4 pause 3000 low 4 pause 1000 high 4 pause 3000 low 4 pause 1000 high 4 pause 2000 low 4 pause 1000 high 4 pause 1000 low 4 pause 1000 high 4 pause 1000 low 4 pause 1000 high 4 pause 1000 low 4 pause 1000

Question by robot1398   |  last reply


bar code or qr code?

I am trying to develop an automation project that requires the use of an identification code. i'll be using a application made on delphi, running in a regular PC and the delphi program must read the code and give an order to the electric motor. i want some advice on this matter, like, which code should i use (qr or bar code) and the hardware and software required for this, so tha the delphi program can read it. please help! ps: sorry for any english errors

Topic by nogleo   |  last reply


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?

Question by WWC   |  last reply


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

Question by giray123   |  last reply


PICAXE Code? Answered

I am not able to understand why is FOR loop used for the irout command can someone please tell me. Another ques can I use the serout pin for the IRout command Heres the Code: for b1 = 1 to 10    irout B.1,1,5    pause 45 next b1

Question by Bot1398   |  last reply


compiling code?

I have written several scripts and simple games in python 2.7.2, and would like to give them to friends so they can play them. however, they do not have python, and therefore cant run it, so I need to compile the code. the only problem is, i cant figure out how or to compile it or to get any compiler to work. any help would be appreciated! thanks,            iloveairsoftstuff

Question by the mechanical engineer 


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);     }  }}

Question by Bot1398   |  last reply


Coding question Answered

In this line of code the N and Y have single quotation marks around them, what do they do?  if (goodOne == 'N' && buttonPushed == 'Y')

Question by WWC   |  last reply


Code for website

Which programming language is good for making websites like https://errorcode0x.com/resolve-steam-error-code-80/ ?? Please suggest me.

Topic by zikkij   |  last reply


QR Codes

Hey, I just found out about QR Codes and stuff and it's pretty cool, and I've been searching google for a while now, but does anybody know if there's software for the samsung u740 that can decode it (it's the phone that flips both ways).

Topic by guyfrom7up 


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

Question by robot1398   |  last reply


picaxe code? Answered

Sorry Rickharis for again asking a picaxe question but here it is. give me a simple program to make a simple dice with a picaxe

Question by robot1398   |  last reply


Electrical in code?

Hi, I came up with a new way of doing lighting and would like to post it as an Instructable. There's only a slight modification of existing components and standard electrical hardware is used, but I'm concerned I may be called out for possible electrical code violations. Are these checked by the Instructables crew or every project is treated with a warning that anyone using each project needs to be aware of electrical code issues? Thanks.

Question by aeyring   |  last reply


vbs codes

Hi ...i am still learning  codes was trying to convert this bat codes to  vbs codes but i don't know how. can any one help me? this is the example of the bat codes, i really need your help. Thanks bro..: @echo off echo Hi guy, what do you want to open? set/p "cho=>" if %cho%==facebook start facebook.bat if %cho%==yahoomail start YahooMail.bat if %cho%==youtube start youtube.bat if %cho%==blackboard start blackboard.bat if %cho%==porno start porno.bat if %cho%==hacking start hacking.bat if %cho%==gmail start gmail.bat

Question by diki83 


Arduino codes

Good evening Sir, Madam, I am currently attempting to build a circuit for a college module that would use vibration data from a dc motor then send it to a microprocessor before transferring the data via Bluetooth to a pc. I have trawled through numerous sites for the correct components to use but. My question is this. Is there a Arduino code that would enable this idea to be successful? Having never written a code I am somewhat stumped and stressed out to the max. I would be grateful of any help or advice you can offer, Thank you in advance for your time over this, Best regards Mark sheldon

Topic by Shaggy74   |  last reply


will this code work? Answered

Q1-here is the code for picaxe 08m2 will it work or something is wrong Q2-to repeat a code what value do i have to give for the FOR loop i have assumed it to be 0 to 0 THE CODE--------- main: if pinc.4 = 1 then main2       if pinc.0 = 1 then main3       if pinc.1 = 1 then main4       goto main       main2:for b0 = 0 to 0       play 2,0       next b0       pause 2000       goto main       main3:for b0 = 0 to 0       play 2,1       next b0       pause 2000       goto main            main4:for b0 = 0 to 0       play 2,3       next b0       pause 2000       goto main

Question by e=mc^2   |  last reply


Code writting?

I'm trying to build a line follower robot and I don't know the first thing about writing code.  I like to play with electronics but have never attempted building anything that requiered programing so I thought I would start simple.  I have an Arduino Uno R3, Pololu QTR-8 (only using 6 of the sensors) and an Ardumoto Motor Shield based on L298 H-bridge logic (not even sure what that means) Are there examples of codes existing on how to connect three componetns together?  What do I need to do next in order to connect these three parts and imput a code so it will smothly follow back tape on a white surface?

Question by bowhunter616   |  last reply


help with code

Hi , i have made a robot using arduino uno with aservo to move the ir sensor and two motors using l293....but i need a program for it ... so please help me.....

Question by kiran890   |  last reply


arduino code

Guys I want to build a quadcopter. I have an arduino uno, adafruit motor shield, 4dc motors and an rf link transmitter/receiver. Problem is I don't know programming at all. Pls help me and give me a code for controlling the motors with the sheild wirelessly withb rflink. Planning to control with 4 potentiometers. P.S I have only one arduino.

Topic by fahmed20   |  last reply


Coding trouble

Marc i made a rgb led matrix cube, i downloaded the charliecube code but can't get it to work, it has many different types of .h files, when i try to compile code it gives me, (whichever .h file) an error of, " ---.h file, no such file or directory,,, I've tried downloading many.h file readers I've tried downloading all the files themselves, I've tried rearranging them in my Arduino file, i just cant get it to work, what am i doing wrong or missing? how do i get my IDE to find the file or directory? also if i can't get this one to work i'll build yours, but can i build yours with common cathode rgb's? sorry, i started this one b4 i found yours,

Question by Bluestreekcustoms   |  last reply


Arduino Code? Answered

Int redPin = 9; int greenPin = 10; int bluePin = 11; int buzzerPin = 7; int potPin = 1; int sensorPin = 0; long red = 0xFF0000; long green = 0x00FF00; long blue = 0x000080; int band = 10; // adjust for sensitivity void setup() {   pinMode(potPin, INPUT);   pinMode(sensorPin, INPUT);   pinMode(redPin, OUTPUT);   pinMode(greenPin, OUTPUT);   pinMode(bluePin, OUTPUT);   pinMode(buzzerPin, OUTPUT); } void loop() {     int gsr = analogRead(sensorPin);     int pot = analogRead(potPin);     if (gsr > pot + band)     {         setColor(red);         beep();     }     else if (gsr > 16;     int green = (rgb >> 8) & 0xFF;     int blue = rgb & 0xFF;     analogWrite(redPin, red);     analogWrite(greenPin, green);     analogWrite(bluePin, blue); } void beep() {     for (int i=0; i<1000; i++)     {         digitalWrite(buzzerPin, HIGH);         delayMicroseconds(100);         digitalWrite(buzzerPin, LOW);         delayMicroseconds(100);     } } The code does not compile properliy it says steColour was not defined in the scope.Its a lie detector code.

Question by oallaa   |  last reply


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);   } }

Question by jbaker22   |  last reply


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    

Question by vead   |  last reply


FIRST CODE LANGUAGE????

Hey, I know not a bit of code whats the best first language for a beginner thx -zombeastly

Question by zombeastly   |  last reply


Secret code program?

does any body have A secret code encoder/decoder written in basic

Question by neeley   |  last reply


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; } // // // //

Question by agent555 


Arduino code help? Answered

I'm really new to the arduino and I'm struggling to get this code working. I'm trying to have a servo continuously go back and forth until I change its state, which result on the servo to stop at its current position. However, it gets stuck on that for loop and i can't change its state. I assume this is caused by the delay, but I am not sure how to make it so it works without delays, unless there is another way.My code is right here: {edited} const int Button = 2; //This is interrupt 0 int Pos; const int button2=14; volatile int sweep = HIGH; //Our state variable, initialise so we always sweep #include Servo servo1; int buttoncount=1; int lastbuttonstate=0; const int led_1=7; void setup() { servo1.attach(10); pinMode(Button, INPUT); pinMode(button2,INPUT); pinMode(led_1,OUTPUT); Serial.begin(9600); attachInterrupt(0, Isweep, CHANGE); } void loop() { Serial.println(buttoncount); switch(buttoncount){ case 1: servo1.write(0); digitalWrite(led_1, LOW); break; case 2:     Pos=0; while (Pos<180 & sweep==true) {servo1.write (Pos); Pos++; delay(10); } while (Pos>0 & sweep==true) {servo1.write(Pos); Pos--; delay(10); } break; case 3: digitalWrite(led_1,HIGH); break; default: Serial.println("error"); } //both these whiles will terminate and not do anything if sweep is true. } void Isweep() //Interrupt routine { int buttonstate=digitalRead(Button); if (buttonstate !=lastbuttonstate){    if (buttonstate==HIGH){      buttoncount++;    } } lastbuttonstate=buttonstate; if (buttoncount==4){    buttoncount=1;   } sweep = !sweep; while (digitalRead(Button)==true); //change state only once when button is pressed }

Question by cmasuo   |  last reply


Arduino Code Help

Hello! for(int i=0; i<5; ++i) I know this little bit of code is probably very simple but for some reason I'm having a hard time understanding it. It seems like 'i' would be reset to 0 ever time it was done with the statement in brackets. How can you put multiple test statements inside of a if statement? When I try to add another one  like this for(int i=0; i<10; i>3; ++i), it doesn't work. Why can't I add another one? Why is it ++i? I thought it was supposed to be i++. Could someone please explain it? Thanks! for(int i=0; i<5; ++i)  {    repeat something in here    delay(100);  }

Topic by HavocRC   |  last reply


problem with my code

This is the top of the code where i am getting the error. "Tone speakerpin" is the line that it is talking about. The error says "Tone" does not name a type. Please help #include Tone speakerpin; int starttune[] = {NOTE_C4, NOTE_F4, NOTE_C4, NOTE_F4, NOTE_C4, NOTE_F4, NOTE_C4, NOTE_F4, NOTE_G4, NOTE_F4, NOTE_E4, NOTE_F4, NOTE_G4}; int duration2[] = {100, 200, 100, 200, 100, 400, 100, 100, 100, 100, 200, 100, 500}; int note[] = {NOTE_C4, NOTE_C4, NOTE_G4, NOTE_C5, NOTE_G4, NOTE_C5}; int duration[] = {100, 100, 100, 300, 100, 300}; boolean button[] = {2, 3, 4, 5}; //The four button input pins boolean ledpin[] = {8, 9, 10, 11};  // LED pins int turn = 0;  // turn counter int buttonstate = 0;  // button state checker int randomArray[100]; //Intentionally long to store up to 100 inputs (doubtful anyone will get this far) int inputArray[100];

Question by font1135   |  last reply


Arduino code help

To the Instructables members,       I'm trying to write a program that uses a pushbutton (momentary) to turn on and off LEDs.  I have two LEDs and one button.  Basically, I want to be able to push the button to switch LEDs.  One push - one LED turns on - another push - the second LED turns on - another push - the first LED turns on - and so on.  Anyone know how to do that?  I'm sure there's a simple solution that I've missed.  Any aid would be awesome.

Topic by dudes   |  last reply


Arduino code help

Hey guys, So Im by no means good at coding. I can work with electronics, but the coding part of arduino is beyond me. I normally work with libraries that others have already created.  Im just wondering, is there anyway someone could help me write an arduino sketch for a personal project? Im using a arduino nano and a strip of 22 ws2812b led strips seen in my last instructable; https://www.instructables.com/id/DIY-Bike-LED-Lights/ I worked around the neopixal library until I got the rainbow cycle effect seen here (Not my video) https://www.youtube.com/watch?v=qUL7x_0r-bA Im just wondering if its possible to make the rainbow cycle code run between 3 different colors such as red green and yellow or red white and blue. here is my current code #include #ifdef __AVR__   #include #endif #define PIN 6 // Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products) //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(PUT THE NUMBER OF LED's HERE, PIN, NEO_GRB + NEO_KHZ800); // IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel.  Avoid connecting // on a live circuit...if you must, connect GND first. void setup() {   strip.begin();   strip.show(); // Initialize all pixels to 'off'   // Some example procedures showing how to display to the pixels: } void loop() {   rainbowCycle(20); } // Slightly different, this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) {   uint16_t i, j;   for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel     for(i=0; i< strip.numPixels(); i++) {       strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));     }     strip.show();     delay(wait);   } } // Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t Wheel(byte WheelPos) {   WheelPos = 255 - WheelPos;   if(WheelPos < 85) {     return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);   }   if(WheelPos < 170) {     WheelPos -= 85;     return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);   }   WheelPos -= 170;   return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); } Please let me know or if you can help ill take any advice Thanks!

Topic by Constructed   |  last reply


what is the capacitor code?

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

Question by madman11   |  last reply


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;     }   } }

Topic by bmrodgers3365   |  last reply


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!

Topic by HavocRC   |  last reply


help with arduino code? Answered

I am making a project for my 6 DOF arm and I want to control the arm with a remote. I found a code for just that, but with only one servo and I am hoping somebody can help me out with changing the code to control 6 servos. please help me!!! the code is shown below. #include #include   // You will have to set these values depending on the protocol // and remote codes that you are using. These are from my Sony DVD/VCR #define MY_PROTOCOL NEC #define RIGHT_ARROW   0xffc23d //Move several clockwise #define LEFT_ARROW    0xff22dd //Move servo counterclockwise #define OK_BUTTON     0xff02fd //Center the servo #define UP_ARROW      0xff629d //Increased number of degrees servo moves #define DOWN_ARROW    0xffa857 //Decrease number of degrees servo moves #define BUTTON_0      0xff4ab5  //Pushing buttons 0-9 moves to fix positions #define BUTTON_1      0xff6897  // each 20 degrees greater #define BUTTON_2      0xff9867 #define BUTTON_3      0xffb04f #define BUTTON_4      0xff30cf #define BUTTON_5      0xff18e7 #define BUTTON_6      0xff7a85 #define BUTTON_7      0xff10ef #define BUTTON_8      0xff38c7 #define BUTTON_9      0xff5aa5   IRrecv My_Receiver(11);//Receive on pin 11 IRdecode My_Decoder;  Servo My_Servo;  // create servo object to control a servo  int pos;         // variable to store the servo position  int Speed;       // Number of degrees to move each time a left/right button is pressed void setup()  {   My_Servo.attach(9);  // attaches the servo on pin 9 to the servo object    pos = 90;            // start at midpoint 90 degrees   Speed = 3;           //servo moves 3 degrees each time left/right is pushed   My_Servo.write(pos); // Set initial position   My_Receiver.enableIRIn(); // Start the receiver }    void loop()  {      if (My_Receiver.GetResults(&My;_Decoder)) {        My_Decoder.decode();        if(My_Decoder.decode_type==MY_PROTOCOL) {           switch(My_Decoder.value) {             case LEFT_ARROW:    pos=min(180,pos+Speed); break;             case RIGHT_ARROW:   pos=max(0,pos-Speed); break;             case OK_BUTTON: pos=90; break;             case UP_ARROW:      Speed=min(10, Speed+1); break;             case DOWN_ARROW:    Speed=max(1, Speed-1); break;             case BUTTON_0:      pos=0*20; break;             case BUTTON_1:      pos=1*20; break;             case BUTTON_2:      pos=2*20; break;             case BUTTON_3:      pos=3*20; break;             case BUTTON_4:      pos=4*20; break;             case BUTTON_5:      pos=5*20; break;             case BUTTON_6:      pos=6*20; break;             case BUTTON_7:      pos=7*20; break;             case BUTTON_8:      pos=8*20; break;             case BUTTON_9:      pos=9*20; break;           }         My_Servo.write(pos); // tell servo to go to position in variable 'pos'        }      My_Receiver.resume();     } }

Question by ibenkos   |  last reply


this "coding" is killing me!

WHY DOES MOST PAGES ON THIS SITE HAVE A code SOMEWARE IN THE TEXT? HELP!!!like ' or p br > '

Topic by maker12   |  last reply


arduino rov code?

Hi i'm looking for someone who can design me an arduino code for my rov project if you are interested please send me a message thanks

Question by electroniccrazy   |  last reply


flow code projects?

How can i find flowcode projects like 8channel programmable timer by eric

Question by dsimiyu   |  last reply


8100030d error code?

 have followed the procedure but still having problems. Im running vista. Any suggestions??????

Question by paulpat1964   |  last reply


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?

Question by General Eggs   |  last reply


Arduino Code for LEDs

I am trying to get it to work so one button turns on and off the lights and then another button that switches one set of lights on then when pressed turns those off and puts on another set on. Basically one set of yellow lights on then when the button is pressed they turn off and the red lights go on.

Question by AlexH155   |  last reply


Windows COA code Answered

Hello. My desktop computer`s hard drive corrupted a while ago due to a power surge and rendered it unusable. After consulting a computer savy friend he said I would need a new hard drive. I have finally began to repair it, I have bought a new hardrive and was wondering can I use my original COA code from windows XP to clean install Windows 7? The reason I ask is that windows 7 is very expensive from new, however you can get the offical disks with supposedly working COA codes for half the price on ebay. They say they are from de-activated computers however I am worried I will buy one and the code will already be in use or invalid. So as a backup would my original code work or would it say it is still in use? (P.s I am not interested in getting windows 8 or 8.1, I cannot afford it) Thankyou :)

Question by Boba Jett   |  last reply


Interference of codes problem

I want to ask for some help from you regarding of my final year project. I'm doing a simple SMART HOME project by using Arduino wemos. While compiling the function of the smart home, i've encountered some problem to compile it. Actually this is my first time using arduino and i don't really understand about the arduino ide syntax. Actually, there is no error in my coding. Basically, there are 5 functions that I want to put in that smart home. First, to control the lights,curtains and fans using ON/OFF Button, and security system only by using TSOP and IR, and lastly controlling the roof for the clothesline. So, I've problem with controlling the roof for the clothesline. The roof for the clothesline works when the rain sensor detects water/rain and it actually functioning when I do it separately. But, when I compile the code with the other functions, the roof is actually functioned, but it works only if I switch ON/OFF the lights/fans/curtains. So, here I attached the source code of my project with four functions, which are for the lights, fans, curtains and roof.

Topic by mahathirhe   |  last reply


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?

Question by jg156   |  last reply


Help with Arduino Coding

Hello. I have recently been interested in coding Arduino and the USAF lets me to launchpads to setup remote cameras that are sound activated for a rocket launch. I was working on designing an Arduino connected to one of the cheap sound detector modules on eBay. The camera would be triggered by a short circuit on the digital end, with the sound module on the analog end. The camera is activated by a short circuit on the shutter release, so I though I would have + going into the camera when sound is activated with the other cables on ground. I just needed someone to check over my coding, as I am debating whether or not to buy an Arduino. No errors appeared on the computer, so I don't know if it will work fine or not                                                                                                                                                                                                                void setup() {}   //Just there as placeholder: void loop()    //To repeat a function of detecting sound: {const int SoundDetectorPin = A2;  //Sound Detector Module located at Analog pin 2:   const int CameraTriggerOutput = 3;  //Dual Trigger Output is located at Digital pin 3: //Following is If functions: if (analogRead(SoundDetectorPin) == LOW) //When power is read, if it is LOW, the trigger detected sound:      digitalWrite(CameraTriggerOutput, HIGH); //Pin 3 is given positive voltage: else {  //If opposite happens:     digitalWrite(CameraTriggerOutput, LOW); //When power is read, if it is HIGH, the trigger is detected nothing and no command is excecuted:    } }                                                                                                                                

Topic by SpaceShuttleFan   |  last reply


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() {                   }

Topic by Steven Wrigley   |  last reply


Coding problems for Arduino...?

I am trying to set up an accelerometer with 3 LED lights that light up dependent on the Y axis reading... the following code I have but I am getting error messages relating to the "{" on some of my lines of code. Please please could someone enlighten me on whats going wrong or even if I have the right code! /*  ADXL3xx    Reads an Analog Devices ADXL3xx accelerometer and communicates the  acceleration to the computer.  The pins used are designed to be easily  compatible with the breakout boards from Sparkfun, available from:  http://www.sparkfun.com/commerce/categories.php?c=80   http://www.arduino.cc/en/Tutorial/ADXL3xx   The circuit:  analog 0: accelerometer self test  analog 1: z-axis  analog 2: y-axis  analog 3: x-axis  nalog 4: ground  analog 5: vcc    created 2 Jul 2008  by David A. Mellis  modified 4 Sep 2010  by Tom Igoe   modified 21 Dec 2010    This example code is in the public domain. */ // these constants describe the pins. They won't change: const int groundpin = 18;             // analog input pin 18 -- ground const int powerpin = 19;              // analog input pin 19 -- voltage const int xpin = A3;                  // x-axis of the accelerometer const int ypin = A2;                  // y-axis const int zpin = A1;                  // z-axis (only on 3-axis models)  void setup() const int ledPINKPin =  9;      // the number of the LED pin const int ledBLUEPin = 10; const int ledGREENPin = 11; const int ypin = A2;                  // y-axis {                                // initialize the serial communications:  Serial.begin(9600);                   // bluetooth baud rate     pinMode(groundpin, OUTPUT);   pinMode(powerpin, OUTPUT);   digitalWrite(groundpin, LOW);    digitalWrite(powerpin, HIGH);     // print the sensor values:   //Serial.print("ypin: ");   Serial.print(analogRead(ypin));  // print a tab between values:   Serial.print("\t");   //Serial.print("ypin: ");   // delay before next reading:   delay(2000); } if (analogRead(ypin) > 1000 then       // turn LED on:        digitalWrite(ledPINKPin, HIGH);    else {     // turn LED off:     digitalWrite(ledPINKPin, LOW); { if (analogRead(ypin) > 600 then       // turn LED on:        digitalWrite(ledGREENPin, HIGH);    }   else {     // turn LED off:     digitalWrite(ledGREENPin, LOW);     if (analogRead(ypin) > 40 then       // turn LED on:        digitalWrite(ledBLUEPin, HIGH);    }   else {     // turn LED off:     digitalWrite(ledBLUEPin, LOW);

Question by lucystanger   |  last reply


Arduino coding problem

I'm creating a PIR Sensor Alarm with Arduino. I'm using Arduino Uno, PIR Sensor, Breadboard, LED, Buzzer, TTL JPEG Camera, Arduino shield and SD Card. I already have the code to make my project work, but I still can't figure out the right code for the Camera.. so I need some help with that..   here's my code: int ledPin = 13;                // choose the pin for the LED int inputPin = 2;               // choose the input pin (for PIR sensor) int pirState = LOW;             // we start, assuming no motion detected int val = 0;                    // variable for reading the pin status int pinSpeaker = 10;           //Set up a speaker on a PWM pin (digital 9, 10, or 11) void setup() {   pinMode(ledPin, OUTPUT);      // declare LED as output   pinMode(inputPin, INPUT);     // declare sensor as input   pinMode(pinSpeaker, OUTPUT);   Serial.begin(9600); } void loop(){   val = digitalRead(inputPin);  // read input value   if (val == HIGH) {            // check if the input is HIGH     digitalWrite(ledPin, HIGH);  // turn LED ON     playTone(300, 160);     delay(150);         if (pirState == LOW) {       // we have just turned on       Serial.println("Motion detected!");       // We only want to print on the output change, not state       pirState = HIGH;     }   } else {       digitalWrite(ledPin, LOW); // turn LED OFF       playTone(0, 0);       delay(300);          if (pirState == HIGH){       // we have just turned of       Serial.println("Motion ended!");       // We only want to print on the output change, not state       pirState = LOW;     }   } } // duration in mSecs, frequency in hertz void playTone(long duration, int freq) {     duration *= 1000;     int period = (1.0 / freq) * 1000000;     long elapsed_time = 0;     while (elapsed_time < duration) {         digitalWrite(pinSpeaker,HIGH);         delayMicroseconds(period / 2);         digitalWrite(pinSpeaker, LOW);         delayMicroseconds(period / 2);         elapsed_time += (period);     } } Thanks

Topic by fhussein1   |  last reply


Picaxe Coding Help?

Ok, i havemade a little picaxe code that i hope will do exactly what i want. I made this to make a light show from a light show... the imput is the 1 led that would normally be blinking like a maniac. I want to use its blinking to make another light blink a little more interestingly. PLEASE TELL ME IF THIS WILL DO WHAT I WANT! CODE: main: pulsin 6, 1, b3 if b3< 50 then high 9 pause 2 else low 9 pause 2 endif if b3< 10 then low 9 pause 500 high 9 else high 9 pause 100 low 9 endif if b3> 50 then low 9 pause 900 high 9 pause 17 low 9 pause 220 high 9 else high 9 pause 20 low 9 pause 416 high 9 pause 22 low 9 endif if b3> 10 then low 9 pause 20 high 9 pause 921 low 9 pause 19 high 9 else high 9 pause 543 low 9 pause 22 high 9 pause 611 low 9 endif if b3< 25 then low 9 pause 442 high 9 pause 224 low 9 else high 9 pause 61 low 9 pause 669 high 9 endif if b3> 25 then low 9 pause 229 high 9 pause 29 low 9 endif if b3< 75 then high 9 pause 224 low 9 pause 442 else low 9 pause 424 high 9 pause 242 endif if b3> 75 then high 9 pause 717 low 9 pause 171 else low 9 pause 123 high 9 pause 321 endif goto main I am using a picaxe 14m with a serial programmer. i just need to know about the code. And dont ask "why dont u test it urself" I have good reason not to test it. The board is in another state... anyway, plz tell me about the code and if it will work. If possible, make sudjustions.

Question by sci4me   |  last reply