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


Code blocks not respecting code

So, I got some feedback that my 'ible has some errors in it (which is somewhat expected :D )  I went to the instructable, to do some editing and noticed that the problems are likely coming from and tags that are in the code blocks. I tried to remove them, but they come back when I save.  I noticed this happens in *all* my code blocks.  Changing the format of text in code blocks makes Instructables unacceptable as a way to share code. Considering the amount of code for many projects on this site, this potentially breaks many of them, or at the very least makes it harder for others to copy the code for their projects.   Please make tags repect all formatting within!  Thanks, JR

Topic by jack ruby   |  last reply


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!

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


Promo code

Ok so I have 3 instructables featured now,yeah , I was given promo code for each but have lost one of the codes, is there anyway of retrieving it? Thanks.

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


Source Code

Hi, Its fantastic to be able to read peoples source code on an instructable. However if its long, its a bit difficult to read. Can you please give the option when making an instructable, to display certain text as syntax, like in forums etc.

Topic by HMBeck 


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


Script Codes

Is it possible to get a list of all script codes? Thank you.

Topic by ChelEddy   |  last reply


Batch Coding

I need an interactive advanced batch and visual basic scripts course.

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


Itune codes?

This may be stupid but... Anyone have itune card that can give me the code? If you do I will sub 5 all of your ibles fave all of your ibles or anything else you want. thank you

Topic by smilee   |  last reply


de-code this

Try to decode this,there is one word here: thcnedrcrpoac

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


Arduino coding

May i know how to combine between 2 coding of arduino ? I use 2 sensor so i need to combine these 2 coding but i don't know how . . Does any body can help me ?i really appreciate for this help.. You can contact me via gmail : nashihanorhata@gmail.com

Question by nash shiha 


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


Pokesav Codes

Hey PKMN Fans im making Pokesav codes for pokemon Diamond and pearl and wanted to now If any one wanted some codes. All you have to do is make sure you have a DS action replay and Either diamond or pearl then tell me all the characteristics you want your pokemon to have. Then I will make it then post the code in the comments for you and others to use. These codes will not work for the GBA games. Here is the code for my ultimate Rayquaza. Diamond: 94000130 FCFF0000 B21C4D28 00000000 B0000004 00000000 E0000304 000000EC 53332F06 3D060000 39DECAD6 8E8EEBFB 5A75143F 27060332 B3A20E5A 518B6AF6 9C01C887 C49482B9 E9675111 B1E6F764 BD7D0CC0 2E4CDDB8 AB511D8E E9CF6DAF 721BF23A 5B20D6EB 85D77B29 485D4BE9 CF072415 C79DC84A 66728577 F0CB878C 10F579FB 071844B7 E8279DEF 7B2D55A8 5DEEA3E6 25C69A8E 5BE816A2 C4EDBB6F F5ABA2A1 978C187B 2192E9C3 C969B273 8C5FD893 2A7F45A5 FC9A788D 5E95FF0F F6947A37 723FCA58 AC83F121 570FDBFC F5865A15 68BE28F2 F7B312DB 60097FA1 0E5EDF8B BEB4D16F 7FBD203F F7D28197 E8CFAE0A D842CD40 837A9328 F37CA0CA AAF31276 188D6E6A 4262B224 00000000 D2000000 00000000 Pearl: 94000130 FCFF0000 B21C4D28 00000000 B0000004 00000000 E0000304 000000EC 53332F06 3D060000 39DECAD6 8E8EEBFB 5A75143F 27060332 B3A20E5A 518B6AF6 9C01C887 C49482B9 E9675111 B1E6F764 BD7D0CC0 2E4CDDB8 AB511D8E E9CF6DAF 721BF23A 5B20D6EB 85D77B29 485D4BE9 CF072415 C79DC84A 66728577 F0CB878C 10F579FB 071844B7 E8279DEF 7B2D55A8 5DEEA3E6 25C69A8E 5BE816A2 C4EDBB6F F5ABA2A1 978C187B 2192E9C3 C969B273 8C5FD893 2A7F45A5 FC9A788D 5E95FF0F F6947A37 723FCA58 AC83F121 570FDBFC F5865A15 68BE28F2 F7B312DB 60097FA1 0E5EDF8B BEB4D16F 7FBD203F F7D28197 E8CFAE0A D842CD40 837A9328 F37CA0CA AAF31276 188D6E6A 4262B224 00000000 D2000000 00000000

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


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

Topic by steveastrouk   |  last reply


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 :(

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


Learn Morse Code

I saw a number of instructables on how to build various kinds of telegraphs, and one including a mapping of characters to either left or right, according to the number of dot's and dashes required to represent it. however, i am missing an instructable about how to LEARN such code. so i've been thinking. it's what i do some times. and i came up with this idea. i am searching for a software that would present you a blank screen. then a letter should appear on the screen, and a sound of the corresponding morse code should be heard. a couple of times. then the same with another letter. next, random letters should show up. the newer they are to the viewer, the often they should be shown and played. after some time, words should appear letter by letter, while playing them. and so on. can anybody help me finding such a piece of software? can anybody make such software?

Topic by DonQuijote   |  last reply


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


hexapod arduino code?

I have just finished designing and building a hexapod with 18 DOF..  powered by arduino nano and a 32 channel servo controller. i need help with code. please help.

Question by icey.hood   |  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


Visual Basic Code...?

Hi all. I am making a CPU benchmark program in Visual basic Express 2010. I have everything I need except the actual STRESS TEST. :D Heres a BASIC look at what i'm thinking i'm going to need. Private Function StressTest() As Integer     'Complex math that will STRESS the CPU a lot     math.math.math............................     math math math.................     'Complex math that will STRESS the CPU a lot     return time-taken-to-run-test-in-mili-seconds End Function Please help me make this! I am SOOOOOO Close! All I need is to know how long the thing took, and the actual math that puts STRESS on the CPU!!! PLEASE HELP ME OUT!!! IT WOULD MAKE A 12 YEAR OLD'S DREAMS COME TRUE!!! THANKS!     

Question by sci4me   |  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