Search for coding in Topics


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


Batch Coding

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

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


Script Codes

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

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


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  


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  


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


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


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  


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


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


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  


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


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


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


Secret Knock Detecting Coding Confuse

Can somebody explain to me about line:int secretKnock [maximumKnocks] = {50,25,25,50,100,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}this is the initial setup:Shave and a Hair Cut..Is it mean that I can only knock using this type of knock?Then how do I record new knock...Else,is it really matter if I use any type of program button? I mean NO, NC?It because my reset button went crazy each time I try to record other knock, it only listen to Shave and a Haircut knock...all the master please help me...?

Question by ElectroThinker  



Can anyone help me with data transmission in serial communication through a hub? Answered

I need to write a c code, and using an Arduino uno, I should be able to transmit a short text to a recipient who is also connected to a hub. many other people are also connected to the same hub, but they should not be able to receive my text. Only the intended receiver is supposed to receive my text. As of now, I don't even know how to start the code. Is anyone out there who can help walk me through this project?

Question by laminceesay    |  last reply


attiny85 to control two different jobs through a switch?

What i really want is to piece up 2 sketches together in attiny85 programming,the result is to enable it to be controlled through a switch.the 2 sketched are pretty long.I don't know how bcz i am a newbie in programming.at first i thought of 'Case,break'syntax,but later found it may not suitable. The pins i choose is Pin4(Analog2) physical pin3 of attiny85 to control of WS2812B light strip.another Pin1(PWM)physical Pin6 to control a speaker. #include #include #define PIN 4 Adafruit_NeoPixel strip = Adafruit_NeoPixel(30, PIN, NEO_GRB + NEO_KHZ800); void setup() {     Serial.begin(9600);   strip.begin();   strip.show(); // Initialize all pixels to 'off' } void loop() {     int sensorValue = analogRead(A0);   Serial.println(sensorValue);//Just for the calipration     if(sensorValue > 10)   { rainbowCycle(0); } if(sensorValue >30){ theaterChase(strip.Color(255,0,0),10); theaterChase(strip.Color(255,0,0),10); theaterChase(strip.Color(0,0,255),10); } if(sensorValue >40){   colorWipe(strip.Color(255,0,0),10);   colorWipe(strip.Color(0,255,0),10);   colorWipe(strip.Color(0,0,255),10); } } ============ /* ATtiny85 Speaker */ // constants const int Speaker = 1;             // speaker pin void setup() {   pinMode(Speaker, OUTPUT); void playBeep(void) {     for (int i=0; i < 500; i++)     {       digitalWrite(Speaker, HIGH);       delay(1);       digitalWrite(Speaker, LOW);       delay(1);     } }

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


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


Arduino Coding help? Answered

I need some guidance on how to write some Arduino code. The physical side is an Arduino mega ADK connected to some buttons and leds. On the code side, I modified the button sketch. I am stuck on how to add multiple buttons. in the void loop. I just need someont to show me how to add 1 after that i can figure out how to add the rest. Thanks,  Kaden const int button1 = 24;     // the number of the pushbutton pin const int button2 = 25; const int button3 = 26; const int button4 = 27; const int button5 = 28; const int Bucket1 = 2; const int Bucket2 = 3; const int Bucket3 = 4; const int Bucket4 = 5; const int Bucket5 = 6; const int Bucket6 = 7; const int Bucket7 = 8; const int Bucket8 = 9; const int Bucket9 = 10; const int Bucket10 = 11; const int Bucket11 = 12; const int Bucket12 = 13; int buttonState1 = 0;         // variable for reading the pushbutton status int buttonState2 = 0; int buttonState3 = 0; int buttonState4 = 0; int buttonState5 = 0; void setup() {   // initialize the LED pin as an output:   pinMode(Bucket1, OUTPUT);   // declare LED strip pin as output   pinMode(Bucket2, OUTPUT);   pinMode(Bucket3, OUTPUT);   pinMode(Bucket4, OUTPUT);   pinMode(Bucket5, OUTPUT);   pinMode(Bucket6, OUTPUT);   pinMode(Bucket7, OUTPUT);   pinMode(Bucket8, OUTPUT);   pinMode(Bucket9, OUTPUT);   pinMode(Bucket10, OUTPUT);   pinMode(Bucket11, OUTPUT);   pinMode(Bucket12, OUTPUT);   // initialize the pushbutton pin as an input:   pinMode(button1, INPUT);   pinMode(button2, INPUT);   pinMode(button3, INPUT);   pinMode(button4, INPUT);   pinMode(button5, INPUT); } void loop() {     buttonState1 = digitalRead(button1);   buttonState2 = digitalRead(button2);   buttonState3 = digitalRead(button3);   buttonState4 = digitalRead(button4);   buttonState5 = digitalRead(button5);   // check if the pushbutton is pressed.   // if it is, the buttonState is HIGH:   if (buttonState1 == HIGH) {     // turn LED on:   digitalWrite(Bucket1, HIGH);  // turn LED strip on when button is pressed   digitalWrite(Bucket2, HIGH);   digitalWrite(Bucket3, HIGH);   digitalWrite(Bucket4, HIGH);   digitalWrite(Bucket5, HIGH);   digitalWrite(Bucket6, HIGH);   digitalWrite(Bucket7, HIGH);   digitalWrite(Bucket8, HIGH);   digitalWrite(Bucket9, HIGH);   digitalWrite(Bucket10, HIGH);   digitalWrite(Bucket11, HIGH);   digitalWrite(Bucket12, HIGH);   }   else {     // turn LED off:   digitalWrite(Bucket1, LOW);  // turn LED strip on when button is pressed   digitalWrite(Bucket2, LOW);   digitalWrite(Bucket3, LOW);   digitalWrite(Bucket4, LOW);   digitalWrite(Bucket5, LOW);   digitalWrite(Bucket6, LOW);   digitalWrite(Bucket7, LOW);   digitalWrite(Bucket8, LOW);   digitalWrite(Bucket9, LOW);   digitalWrite(Bucket10, LOW);   digitalWrite(Bucket11, LOW);   digitalWrite(Bucket12, LOW);   } }

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


Secret code program?

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

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


de-code this #3

De-code this: 5,19,21,15,13 hints: go here

Topic by iproberry1    |  last reply


de-code this #4

Find the word it this code:  15,7,14,25,1,18,9,6,16 Hints: not every number is used to make the word it's a musical instrument last code rule

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


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


SMD components codes

Its my first time using smd components i bought some transistor but i dont know how to identify itcode written on it is 3ft22what transistor is this and how you read code like these ?

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