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

Search for coding in Topics


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

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

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

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

Script Codes

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

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

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  

de-code this

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

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

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 :

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

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

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

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

Help in coding for adruino of code from net

Hi i have downloaded following code from net the problem is it is diy project so thought it interesting and bought all the materials i dont know anything about adruino coding and thought code was what i required but know when i am uploading script by copying text code file it is showing error please someone help me and explain what has to be done as all my money is going to waste the code is#include#include "Arduino.h"#include //Include libraries: SoftwareSerial & WireSoftwareSerial ESP_BT(0,1); //Define PIN11 & PIN12 as RX and TX pins#include #include #include #include #ifndef PSTR #define PSTR // Make Arduino Due happy#endif#define PIN 5// MATRIX DECLARATION:// Parameter 1 = width of NeoPixel matrix// Parameter 2 = height of matrix// Parameter 3 = pin number (most are valid)// Parameter 4 = matrix layout flags, add together as needed:// NEO_MATRIX_TOP, NEO_MATRIX_BOTTOM, NEO_MATRIX_LEFT, NEO_MATRIX_RIGHT:// Position of the FIRST LED in the matrix; pick two, e.g.// NEO_MATRIX_TOP + NEO_MATRIX_LEFT for the top-left corner.// NEO_MATRIX_ROWS, NEO_MATRIX_COLUMNS: LEDs are arranged in horizontal// rows or in vertical columns, respectively; pick one or the other.// NEO_MATRIX_PROGRESSIVE, NEO_MATRIX_ZIGZAG: all rows/columns proceed// in the same order, or alternate lines reverse direction; pick one.// See example below for these values in action.// Parameter 5 = 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_GRBW Pixels are wired for GRBW bitstream (RGB+W NeoPixel products)// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)// Example for NeoPixel Shield. In this application we'd like to use it// as a 5x8 tall matrix, with the USB port positioned at the top of the// Arduino. When held that way, the first pixel is at the top right, and// lines are arranged in columns, progressive order. The shield uses// 800 KHz (v2) pixels that expect GRB color data.Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix( 32, //Select LEDs of each row (15 in my case) 8, //Select amount of rows (7 in my case) PIN, NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT + //Define first data pin (right bottom corner is my first pin) NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG, //Define the type of connection (in a zig zag connections and divided by rows not columns) NEO_RGB + NEO_KHZ800); int Red=255,Green=0,Blue=0; String text="Easy Tech"; String RGB; int pixelPerChar = 5,RGB_Completed=0; int Delay, Brightness;const uint16_t colors[] = {matrix.Color(Green,Red,Blue)};// matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) };//matrix.Color(Red, Green, Blue),void setup() { Serial.begin(115200); ESP_BT.begin(9600); EEPROM.begin(); initdata(); // Serial.println("Start"); const uint16_t colors[] = {matrix.Color(Green,Red,Blue)}; matrix.begin(); matrix.setTextWrap(false); matrix.setBrightness(Brightness); matrix.setTextColor(colors[0]); //matrix.setTextColor(matrix.Color(Green,Red,Blue));}int x = matrix.width();int pass = 0;void loop() { while(ESP_BT.available()){ char ReadChar = (char); Serial.println(ReadChar); // Right parentheses ) indicates complet of the string if(ReadChar == ')' ||ReadChar == '}' || ReadChar == ']'){ if(ReadChar == ')' ){ RGB_Completed = 1; } if(ReadChar == '}'){ RGB_Completed = 2; } if(ReadChar == ']'){ RGB_Completed = 3; } } else{ RGB += ReadChar; } } if(RGB_Completed!=0){ if(RGB_Completed==1){ Light_RGB_LED(); RGB_Completed=0; } if (RGB_Completed==2){ text=RGB; int _size = text.length(); int i; for(i=0;i<_size;i++) { EEPROM.write(50+i,text.charAt(i)); Serial.println(text.charAt(i)); } EEPROM.write(50+_size,'\0'); //Add termination null character for String Data RGB_Completed=0; RGB=""; } if (RGB_Completed==3){ int val=RGB.toInt(); if(val>0 && val<=100){ if(val==0){ val=1; } Delay=(100-val)*2.5; //scroll(Delay); EEPROM.write(0,Delay); } else{ val=val-100; matrix.setBrightness(val); EEPROM.write(5,val); } RGB=""; RGB_Completed=0; } } if(RGB_Completed==0){ //. Serial.println(RGB_Completed); scroll(); }}void scroll(){ //Serial.println(text); int maxDisplacement = text.length() * pixelPerChar + matrix.width(); matrix.fillScreen(0); matrix.setCursor(x, 0); matrix.print(text); if(--x < -maxDisplacement) { x = matrix.width(); if(++pass >= 1){ pass = 0; // matrix.setTextColor(colors[pass]); matrix.setTextColor(matrix.Color(Green,Red,Blue)); // matrix.setTextColor(matrix.Color(Red,Green,Blue)); } }; delay(Delay);}void Light_RGB_LED(){ int SP1 = RGB.indexOf('.'); int SP2 = RGB.indexOf('.', SP1+1); int SP3 = RGB.indexOf('.', SP2+1); String R = RGB.substring(0, SP1); String G = RGB.substring(SP1+1, SP2); String B = RGB.substring(SP2+1, SP3); Red=R.toInt();Green=G.toInt();Blue=B.toInt();// Serial.println(R); matrix.setTextColor(matrix.Color(Green,Red,Blue)); EEPROM.write(10,Red);EEPROM.write(15,Green);EEPROM.write(20,Blue); RGB="";}and 1 more file is ther as function of code which isvoid initdata(){ int; if(Speed==NULL || Speed==0){ Delay=100; } else{ Delay=Speed; } int bright=; if(bright==NULL || bright==0){ Brightness=40; } else{ Brightness=bright; } int r=; if(r==NULL){ Red=0; } else{ Red=r; } int g=; if(g==NULL){ Green=255; } else{ Green=g; } int b=; if(b==NULL){ Blue=0; } else{ Blue=b; } char data[100]; //Max 100 Bytes int len=0; char k; String Text= "";; while(k != '\0' && len<500) //Read until null character {; data[; len]=k; Text+=k; len++; } data[len]='\0'; if(Text==NULL){ text="EASY TECH"; } else{ text=Text; }Serial.println(Speed);Serial.println(Brightness);Serial.println(Red);Serial.println(Green);Serial.println(Blue);Serial.println(text); }how do i make the script please please help

Topic by sawhneyieesh  

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


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


Topic by maker12    |  last reply

de-code this #5

De-code this: Care Rector You Hints: rearrange the letters to make the words (3 words) 1 word in the words above is used in the final code 1 word was used in a previous topic

Topic by iproberry1    |  last reply