Infinity divided by 0?

Does infinity divided by zero theoretically equal any number other than 0 or infinity? I heard something about ohm's law applied to a circuit with an ideal voltage source (which is only theoretically possible) and having the terminals shorted out and at 0 ohms, resulting in the current going up to infinity? 

Question by .Unknown.   |  last reply


What is 1 / 0 ? Answered

Here is tricky one try and answer it... 

Question by PREDATOR_UK   |  last reply


Zune 3.0

How is everybody enjoying the new software for the zune, 3.0? Also did anyone buy the 16gb or 120gb zune?

Topic by JellyWoo   |  last reply


ipod 3.0 hacking help

When i go to open my redsnow files after clicking restore it says the firmware isnt compatible. how can i fix this?

Question by  


Which bluetooth (preferable 4.0) module can I use to attach and transfer digital data collected by a circuit ?

I'm looking to transfer the data from a component like simple digital calculator over bluetooth. I'm looking for advise on a bluetooth module esp 4.0 if available to attach to this ciruit and transfer data.

Question by nooraninadir   |  last reply


sketch for arduino obstacle robot using seed motor shield v2.0?

Hi everybody, im barely started writing sletch so i need help, i build a obstacle robot and i used  arduino uno r3 seeed motor shield v2.0 one servo tamiya twin motor gear box hc-sr04 sensor  so i dont really know how to start writind the sketch.....

Question by salvador.lopez1   |  last reply


static int counter = 0; if ((++counter & 0x3f) == 0) Answered

I have not been ablle to find a laymans discription of what this is counting. Looks like it is counting 63 times from the 0x3f ASCII charactor. I bleave it is counting for the helper light, but what for? #include #include #include Password password = Password( "7457" ); //password to unlock door, can be changed const byte ROWS = 4; // Four rows const byte COLS = 3; // columns const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // Define the Keymap char keys[ROWS][COLS] = { {'1','2','3',}, {'4','5','6',}, {'7','8','9',}, {'*','0','#',}, }; byte rowPins[ROWS] = { 5, 4, 3, 2 };// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins. byte colPins[COLS] = { 8, 7, 6,};// Connect keypad COL0, COL1 and COL2 to these Arduino pins. Stepper myStepper(stepsPerRevolution, 9,10,11,12); int enable_pin = 13; int button_pin = A0; int button_pinstate = 0; // variable to store current pir state //int lastpirstate = 0; // variable to store last pir state int lastbutton_pinstate = 0; int pos = 35; int pos2 = -35;  // Create the Keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); unsigned long offtime; boolean helper_light_is_on = false; // helper light off void setup(){ myStepper.setSpeed(60); // set the speed at 60 rpm: pinMode( button_pin, INPUT); digitalWrite(button_pin, HIGH); // pull-up Serial.begin(9600); Serial.write(254); Serial.write(0x01); delay(200); pinMode(15, OUTPUT); //Helper light pinMode(16, OUTPUT); //green light pinMode(17, OUTPUT); //red light pinMode(enable_pin, OUTPUT); digitalWrite(enable_pin,HIGH); keypad.addEventListener(keypadEvent); //add an event listener for this keypad } void loop() { button_pinstate = digitalRead(button_pin); if(button_pinstate != lastbutton_pinstate) { Serial.println(" Button Press"); if(button_pinstate == LOW)// { delay(10); digitalWrite(enable_pin,HIGH); myStepper.step(pos); Serial.print(" Open "); delay(2000); myStepper.step(pos2); Serial.print(" Close "); digitalWrite(enable_pin,LOW); delay(10); } static int counter = 0; if ((++counter & 0x3f) == 0) Serial.println(); delay(100); keypad.getKey(); myStepper.step(0); process_helper_light(); } void keypadEvent(KeypadEvent eKey) { switch (keypad.getState()) { case PRESSED: // a key is pressed so light the helper light helper_light_is_on = true; digitalWrite(15,HIGH); offtime = millis() + 5000; // set the offtime for 30 seconds in the future Serial.print(" enter: "); Serial.println(eKey); delay(10); Serial.write(254); switch (eKey) { case '*': checkPassword(); delay(1); break; case '#': password.reset(); delay(1); break; default: password.append(eKey); delay(1); } } } void checkPassword() { if (password.evaluate()) //if password is right unlock door { Serial.println(" Accepted"); Serial.write(254); delay(10); digitalWrite(enable_pin,HIGH); myStepper.step(pos); Serial.print(" open "); digitalWrite(16, HIGH);//turn on green led delay(2000); //wait 5 seconds digitalWrite(16, LOW);// turn offgreen led myStepper.step(pos2); digitalWrite(enable_pin,LOW); Serial.print(" Close "); } else { Serial.println(" Denied"); //if passwords wrong keep door locked Serial.write(254); delay(10); myStepper.step(0); Serial.println(" locked "); digitalWrite(17, HIGH); //turn on red led delay(2000); //wait 5 seconds digitalWrite(17, LOW);//turn off red led } }  void process_helper_light(void) { if (helper_light_is_on) { if (millis() >= offtime) { digitalWrite(15,LOW); //turn off the helper light helper_light_is_on = false; } } }

Question by WWC   |  last reply


Running USB 3.0 extension next to AC line

I have an HTPC hooked up to the entertainment center.  I have a 5ft rubber "wire-hider" that I'm running an extension cord to a coffee table with a hidden power strip so people can plug in their laptops, etc. I bought a 5m/"15 ft" usb 3.0 extension cable and ran it next to the cord in the wire-hider, then connected usb 3.0 powered hub to the cable.  PC struggles to connect devices, and drops them intermittently. My 1st guess was EMI, so I unplug the extension and no problems. My question, can anyone suggest a source for shielded USB 3.0 extension cable OR can I use Shielded Cat6 to run USB 3.0 signals?  Besides wireless or buying a second wire-hider, do you have any other suggestions?

Question by jongscx   |  last reply


0-12V Digital Display?

Here's what I need, and haven't been able to figure out how to do it: I designed a motor speed controller that runs a 12V fan.  Speed control is via PWM through a 50K linear Potentiometer. I need to be able to read the percentage of run voltage ie: 0V=0%, 6V=50%, 12V=100%.  I want to display this on 3 7-segment LED displays. Anyone with insight would be greatly appreciated. Brian

Question by BrianAriz   |  last reply


Can rhino 4.0 export as dxf? Answered

I am almost positive that rhino will, but I wanted to double-check, because I can't find if it does anywhere. Thanks in Advance! AI

Question by JaredsProjects   |  last reply


LM2576SX-5.0 VS LM2576SX-3.3,which is better?

Please Help. I want to know if I should buy a LM2576SX-5.0 timer or a  LM2576SX-3.3 IC. Can I do the same things with each? Is there much difference? Here is the datesheet:   LM2576SX-5.0 datesheet LM2576SX-3.3 datesheet Thank you guys, Electronicsloser

Question by DELETED_MakiY2   |  last reply


Is there a way to get around the Photoshop Elements1.0.1 installer demand for Internet Explorer 4? Answered

We have Internet Explorer 12 and my photoshop installation disk demands IE 4.   I LIKE Photoshop Elements 1.0.1.  Needless to say, I've used it for years.  Is there anything I can do to get it loaded onto my present computer?

Question by mole1   |  last reply


A quick RAID question!

I want to have a larger amount of space on my server and also be able to keep all my music and whatnot together. I currently have a 160gb drive in this pc that is full to the brim with music (oh that will be fun finding places for it all). And I have a 160 in the server with random backup files and whatnot, what I'd like to do is set it up with RAID 0, so I have around 320gb of space all together. I was wondering though what anyone thought of doing this if it was very safe if one of the drives fail, I realize I'd loose all the data on the one drive, but would it be possible to recover the data on other other drive still? Also, these aren't sata drives, so I'll have to use window's built in RAID controller thingy. Perhaps I should just pull out a bunch of old hard drives and rig them up to one of my test mobo's and try it with that first? Can you raid USB and ide drives together? 

Topic by Punkguyta   |  last reply


i made a portable speaker using an old telephone reciever.. the sound emitted is not too great. Need inputs

Just to give u more info.. the speaker is 1.5- 2inches in diameter. I am using a ipod shuffle 2g box as its enclosure. The sound produced is "O.K" or average.. u can hear music/audio but its not for people who like it too loud..  I need your inputs as to is the sound less because of the enclosure or because of the speaker and how can i make it more effective....

Question by seetharam   |  last reply


Ethernet to USB 3.0?

I was looking around this afternoon and found the wonderful 'PCI Express X16 to USB 3.0 adapter' which got me thinking, This could be an awesome way to add a better graphics card to a small computer e.g. a laptop or preferably a Raspberry Pi. Now i know that the Pi doesn't have any USB 3.0 ports but it does have Ethernet (which from past experience is quite a lot faster than USB 2.0) My question to you is this: Is it possible to get a USB 3.0 to Ethernet adapter so that we can have USB 3.0 ports on a Raspberry Pi, and if so would the Pi be fast enough to run an external graphics card connected through a PCI Express to USB 3.0 adapter?

Question by macman808   |  last reply


I have a laptop equipped with two usb 2 and two usb 3 ports. The 2 ports work fine but the 3 ports have a problem? Answered

The usb 3.0 ports don't seem to work. The have power and if I plug a simple device like a light or fan in to them it will work but if I plug in a mouse, flash drive, or anything else that works with the computer rather than just draw power it doesn't work. Unfortunately I don't have any usb 3.0 devices to experiment with. I have no Idea how to start narrowing down the problem so some guidance would be greatly appreciated. If you need more information tell me what you need and I will try to provide as timely as possible.

Question by Shadow13!   |  last reply


Broken USB 2.0

Is it possible to fix a USB 2.0 that has become loose in it's case.  It  attaches to a Cooler Master Laptop cooler.  But since my cat hit it with his head it is now loose in its socket and will not power my Cooler Master.  It only has the 1 USB that plugs into my Laptop and runs from the battery or power cord of the Laptop or if the Laptop is  plugged into a power outlet.  I bought a new and different Cooler for my Laptop but I find I don't think it cools as well as my old Cooler Master. I have tried Cooler Master company itself and they were of no help. Can someone here help me with this problem.  I will try and explain how it is connected to the Cooler Master itself. The USB 2.0 has a long cord  that splits into two different wires.  Like a Y set up. One leg of the Y goes to 1 fan and the other Y goes to the second fan.  So both fans are connected to the Y with the USB 2.0 at the end of the Y that plugs into my USB port on my Laptop.  So with out the USB the Cooler Master will not work. I hope I explained it all right.  Can someone PLEASE help me fix this.  I do not like the new fan.   I want my Cooler Master back. I would appreciate any help you could give me. Thank You.............Glenda D

Question by GlendaD3   |  last reply



Can any one tell me 0.218k ohms or 0.220k ohms = how many ohms and the color code of the resistor? Answered

Can any one tell me what is the color code for 0.220k or 0.218k resistor

Question by Soumojit   |  last reply


Getting my comp to see my arduino uno clone ? The same ol windows route shown everywhere aint werkin'!!?

XP pro -sp3 -  ...I've tried installing the official USB2.0 driver, I've  tried the Virtual com port and the FTDI  drivers from the official sites...NOTHIN'!! I keep getting FOUND NEW HARDWARE -USB2.0-SERIAL...I go through all the steps found everywhere on how to "normally" get the comp and UNO to show up in sys' properties and hardware profiles etc etc....problem is I dont get any of the results nor devices these how-tos are showing. I know my way around a comp and windows...I'm just not getting past the NEW HARDWARE USB2.0  issue..let alone even seeing UNO as a device. The virtual port drivers dont do anything at all...no more ports show up, no option to create one.... I've installed the arduino drivers incl. USB and the UNO drivers...no love either I've uninstalled and installed in the root dir. ..no luck.. I even changed the ATmega from the 8A it came with to a ATm328 w/ bootloader and blink sketch already installed on  my Arduino as well. ANYONE have this issue that has found a solution?.... other than throwing my comp out the window and using the UNOs as fancy paper weights?

Question by schel   |  last reply


Im out of .1uF capacitors! Can I replace them with a different value?

Im building a FM transmitter and the project requires (3) 0.1uF capacitors. But i have none left! Can i replace them with a different value?∫

Question by nadav   |  last reply


FTDI VCOM port USB2.0 my head meeting the wall

OK  for real this has been going on for days n' days. I cant get my windows xp pro sp3   - to see any attached device other than the USB2.0-SERIAL  it sees when I hook up my UNO clone-ATMega 328 w/ arduino bootloader already "factory "installed   - Using the USB,  I keep getting  NEW DEVICE USB2.0-SERIAL , and YES, I've followed ALL+ the step by steps out there for doing this...it's just I dont get an UNO nor anything but the USB2.0 message. The FTDI  bit and the virtual com port did nothing...er capital N-othing. I uninstalled -reinstalled tried different USB ports. I just want to play with my UNO!!!   anyone?

Question by schel 


2 projects, 2 questions. help? Answered

Hi everybody i have 2 new projects i am working on, and i had some questions about them: 1-wirelessly (bluetooth) controlled LED So this is more or less a starter project, i just got a new laptop with bluetoth and i want to experiment, i figured being able to turn an led on and off via bluetooth would be a good start. 2-Webcam that fits in a PCMCIA slot filler card I think that this project has a better chance of actually being finished than the one above... along with my new laptop, i got one that had a broken screen, it also had a built in webcam. (acer travelmate 5530, the bottom will be used in some other project) I removed the webcam and later i had the thought that maybe it was thin enough to fit in a pcmcia slot. almost. the question here is if i sanded down the plastic parts on the top of the lens (not the lens itself, there is a bit of plastic that bevels around the lens) to the point where it would be thin enough, could someone help me find a pinout of the webcam? all i know is that its usb 2.0, but the connector has 5 wires, 2 of them are ground, but the data + and - and vcc are unknown, the wire colors are different than a normal usb color code. I cannot upload pictures quite yet but i will as soon as i can.

Question by zack247   |  last reply


Wii - Play Backup Games without modchip -- System Menu V 4.0 ?

Please note: I am beginner at this. Ok, here is what I have done: 1. I have upgraded my System Menu to version 4.0 using the update option from the Wii2. Following this instructable: https://www.instructables.com/id/S9RV0FWFN4H8OED/ I have installed cIOS36 Rev7. This means that I have also installed Homebrew Channel (using Bannerbomb exploit ). 3. Following the same instructable I have got to the point where I got the Error ret-2011 which a lot of other people (with System Menu 4.0) got: " tried to install the 04-BackupLauncher0.3g+_249-NeoRame.rar like instructed below.I get a installing ticket...ERROR! (ret = -2011)"4. After that everything went down the drain. I have tried to follow this instructable: https://www.instructables.com/id/SQHX9S3FUNOXOKE/ with both versions (offline and online), but I kept getting the -2011 error. 5. I have tried to follow other tutorials out there but I did not get any further because of different errors. Now I do not know what version of cIOS or other files I have installed on my Wii.I have tried to update again my System Menu 4.0 in case I have messed up anything but my Wii says that I already have the latest version installed. So my questions are: 1. How do I know what version of the Files I have and whether I have messed up my System Menu ? And how do I get back to the original System Menu 4.0 of the files? 2. Since the aim of this entire thing is to play backup games, how do I fix this and how do I get my Wii to play the backup games, from backup DVDs (I've seen that it might be possible to play them from USB devices, I am not interested in that right now). Also, I do not want to install any other homebrew applications (like DVD players or video players).3. If in the process I have to downgrade my System Menu, what are the exact steps to do that? Thank you very much for your help and I hope someone will be able to help me make things work !If you think you can help but you need more information, please comment on my question and I will provide as much information as I can

Question by liljohnnydoe   |  last reply


How do i convert the wxp file that wax 2.0 saves into something my computer can read, like avi or wmv?

I've been looking around, people have the same problem but i've never found a solution. Your help would be appreciated.

Question by knoxarama   |  last reply


There is no place like 127.0.0.1

A take on the "There is no place like 127.0.0.1" which is a take on "There is no place like home" from the Wizard of OZ.  Contains IP addresses, red slippers, and ma thematic sequences.

Topic by GenAap 


Arduino Coding Question: How do I blink one LED 8 times and then another LED 8 times then repeat?

I'm using two 4017 decade counters to count to 16 and I figure two Arduino outputs would be a good way to go. I want one 4017 to receive 9 pulses then and then wait while the other 4017 receives 9 pulses. (one pulse is a holding position) For the moment I'm just trying to blink one LED 9 times and then another 9 times to represent two separate clock outputs. Here is a diagram: pin 13    1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, pin 12    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, Start      ------------------------------------------------------------------------------------------------------------ then loop. This is for multiplexing a 16x16 led screen so I don't think I should use the  delay(1000);  command. Each counter needs 9 pulses with the last pulse to the first counter happening simultaneously with the first pulse to the second counter. And similarly the first counter getting its first pulse at the same time as the second counter gets its 9th pulse. Get it?

Question by snotty   |  last reply


which is suitable for producing KCLO3 by electrolysis, fertilizer grade KCL(0-0-60) or food grade KCL?

Fertilizer grade is 0% N, 0% P, 60%K and the rest is KCL while food grade KCL is about 49% KCL and the rest is NaCl

Question by davincicoder   |  last reply


DIY, AC to DC Converter, Variable 0-60vDC, variable 0-10A : is this possible and done with shoestring budget?

Hey, I've been experimenting with Electrolysis and have reached the end of what I can do with a couple of car batteries and a car battery charger. I would like to build a AC to DC converter (as I can't find anything built with the options I want). I believe the sweet spot I am headed for is 52 Volts and 1.5 -3 Amps. I would like to have variable voltage output from 0-60 Volts and variable Amperage output of 0-10 Amps. Is this something than can be put together on a hobbyist's budget? Thanks In advance!

Question by jdevereaux1   |  last reply


Need help with DMX512 to Analog 0-10VDC Decoder

I am looking to *update* some old strobe lights that my theater uses to be able to control them through our DMX control board.  They have 2 analog 0-10V inputs to control the flash rate and the intensity.  I am looking for the simplest solution as we do not have a lot of money to throw at this project.  I have some experience in electronics as well as working with arduino, but not enough to tackle this job by myself.   Any thoughts on this would be appreciated!  Attaching the control spec sheet. Tom

Topic by AJackOfAllTrades   |  last reply


Arduino 5x9 led display and 0-10V voltmeter. Answered

Arduino Duemilanove ATmega328 I want to make a 5x9 led display that monitors a 0-9.99VDC source for a huge motor. I would like to display up to a hundredth of a volt. I would like to do this all using 1 board. I plan on having it display the 3 digits using the 5x9 led display. Can I do this with the limited pins I have without using a shift register? (I think thats what it is called) Do I have all that I need? I have some knowledge of electronics but am in the learning stage but this project will help me a lot in my everyday life. This will be used to monitor a DC water turbine for my pool. I have: -tons of LEDS -Arduino -tons of resistors

Question by newrev426   |  last reply


Address LEDs on a LOL shield help... please?

A couple of the tutorials use the following arrays... http://code.google.com/p/lolshield/downloads/list I spent a couple hours trying to help out a friend and could not dumb the code down to address individual LEDs using the understood matrix below... uint16_t BitMap[][9] PROGMEM = { {1, 0, 0, 0, 0, 0, 0, 0, 0}, {3, 1, 0, 0, 0, 0, 0, 0, 0}, {7, 3, 1, 0, 0, 0, 0, 0, 0}, {15, 7, 3, 1, 0, 0, 0, 0, 0}, {31, 15, 7, 3, 1, 0, 0, 0, 0}, {63, 31, 15, 7, 3, 1, 0, 0, 0}, {127, 63, 31, 15, 7, 3, 1, 0, 0}, {255, 127, 63, 31, 15, 7, 3, 1, 0}, later in the code they use the following to 'fetch' the lines... for(line = 0; line < 9; line++)       {         data = pgm_read_word_near (&BitMap;[frame][line]);   // fetch data from program memory When I try to hi-jack the above line and use my 'own' numbers: data = pgm_read_word_near (&BitMap;[frame[1][3]);... it does not function.. I'm just trying to call out individual LEDs in response to external sensors and turn them ON and OFF with delays and such... any help breaking down this code? I understand the matrix but can't seem to call it out... thanks! HERE is the sample code: #include   //This is in the Arduino library int blinkdelay = 75; //This basically controls brightness. Lower is dimmer int runspeed = 20;   //smaller = faster int pin13 =13; int pin12 =12; int pin11 =11; int pin10 =10; int pin09 =9; int pin08 =8; int pin07 =7; int pin06 =6; int pin05 =5; int pin04 =4; int pin03 =3; int pin02 =2; const int pins[] = {   pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02}; const int ledMap[126][2] ={ {pin13, pin05},{pin13, pin06},{pin13, pin07},{pin13, pin08},{pin13, pin09},{pin13, pin10},{pin13, pin11},{pin13, pin12},{pin13, pin04},{pin04, pin13},{pin13, pin03},{pin03, pin13},{pin13, pin02},{pin02, pin13}, {pin12, pin05},{pin12, pin06},{pin12, pin07},{pin12, pin08},{pin12, pin09},{pin12, pin10},{pin12, pin11},{pin12, pin13},{pin12, pin04},{pin04, pin12},{pin12, pin03},{pin03, pin12},{pin12, pin02},{pin02, pin12}, {pin11, pin05},{pin11, pin06},{pin11, pin07},{pin11, pin08},{pin11, pin09},{pin11, pin10},{pin11, pin12},{pin11, pin13},{pin11, pin04},{pin04, pin11},{pin11, pin03},{pin03, pin11},{pin11, pin02},{pin02, pin11}, {pin10, pin05},{pin10, pin06},{pin10, pin07},{pin10, pin08},{pin10, pin09},{pin10, pin11},{pin10, pin12},{pin10, pin13},{pin10, pin04},{pin04, pin10},{pin10, pin03},{pin03, pin10},{pin10, pin02},{pin02, pin10}, {pin09, pin05},{pin09, pin06},{pin09, pin07},{pin09, pin08},{pin09, pin10},{pin09, pin11},{pin09, pin12},{pin09, pin13},{pin09, pin04},{pin04, pin09},{pin09, pin03},{pin03, pin09},{pin09, pin02},{pin02, pin09}, {pin08, pin05},{pin08, pin06},{pin08, pin07},{pin08, pin09},{pin08, pin10},{pin08, pin11},{pin08, pin12},{pin08, pin13},{pin08, pin04},{pin04, pin08},{pin08, pin03},{pin03, pin08},{pin08, pin02},{pin02, pin08}, {pin07, pin05},{pin07, pin06},{pin07, pin08},{pin07, pin09},{pin07, pin10},{pin07, pin11},{pin07, pin12},{pin07, pin13},{pin07, pin04},{pin04, pin07},{pin07, pin03},{pin03, pin07},{pin07, pin02},{pin02, pin07}, {pin06, pin05},{pin06, pin07},{pin06, pin08},{pin06, pin09},{pin06, pin10},{pin06, pin11},{pin06, pin12},{pin06, pin13},{pin06, pin04},{pin04, pin06},{pin06, pin03},{pin03, pin06},{pin06, pin02},{pin02, pin06}, {pin05, pin06},{pin05, pin07},{pin05, pin08},{pin05, pin09},{pin05, pin10},{pin05, pin11},{pin05, pin12},{pin05, pin13},{pin05, pin04},{pin04, pin05},{pin05, pin03},{pin03, pin05},{pin05, pin02},{pin02, pin05} }; uint16_t BitMap[][9] PROGMEM = { {1, 0, 0, 0, 0, 0, 0, 0, 0}, {3, 1, 0, 0, 0, 0, 0, 0, 0}, {7, 3, 1, 0, 0, 0, 0, 0, 0}, {15, 7, 3, 1, 0, 0, 0, 0, 0}, {31, 15, 7, 3, 1, 0, 0, 0, 0}, {63, 31, 15, 7, 3, 1, 0, 0, 0}, {127, 63, 31, 15, 7, 3, 1, 0, 0}, {255, 127, 63, 31, 15, 7, 3, 1, 0}, {511, 255, 127, 63, 31, 15, 7, 3, 1}, {1023, 511, 255, 127, 63, 31, 15, 7, 3}, {2047, 1023, 511, 255, 127, 63, 31, 15, 7}, {4095, 2047, 1023, 511, 255, 127, 63, 31, 15}, {8191, 4095, 2047, 1023, 511, 255, 127, 63, 31}, {16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63}, {16383, 16383, 8191, 4095, 2047, 1023, 511, 255, 127}, {16383, 16383, 16383, 8191, 4095, 2047, 1023, 511, 255}, {16383, 16383, 16383, 16383, 8191, 4095, 2047, 1023, 511}, {16383, 16383, 16383, 16383, 16383, 8191, 4095, 2047, 1023}, {16383, 16383, 16383, 16383, 16383, 16383, 8191, 4095, 2047}, {16383, 16383, 16383, 16383, 16383, 16383, 16383, 8191, 4095}, {16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 8191}, {16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383}, {16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383}, {16382, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383}, {16380, 16382, 16383, 16383, 16383, 16383, 16383, 16383, 16383}, {16376, 16380, 16382, 16383, 16383, 16383, 16383, 16383, 16383}, {16368, 16376, 16380, 16382, 16383, 16383, 16383, 16383, 16383}, {16352, 16368, 16376, 16380, 16382, 16383, 16383, 16383, 16383}, {16320, 16352, 16368, 16376, 16380, 16382, 16383, 16383, 16383}, {16256, 16320, 16352, 16368, 16376, 16380, 16382, 16383, 16383}, {16128, 16256, 16320, 16352, 16368, 16376, 16380, 16382, 16383}, {15872, 16128, 16256, 16320, 16352, 16368, 16376, 16380, 16382}, {15360, 15872, 16128, 16256, 16320, 16352, 16368, 16376, 16380}, {14336, 15360, 15872, 16128, 16256, 16320, 16352, 16368, 16376}, {12288, 14336, 15360, 15872, 16128, 16256, 16320, 16352, 16368}, {8192, 12288, 14336, 15360, 15872, 16128, 16256, 16320, 16352}, {0, 8192, 12288, 14336, 15360, 15872, 16128, 16256, 16320}, {0, 0, 8192, 12288, 14336, 15360, 15872, 16128, 16256}, {0, 0, 0, 8192, 12288, 14336, 15360, 15872, 16128}, {0, 0, 0, 0, 8192, 12288, 14336, 15360, 15872}, {0, 0, 0, 0, 0, 8192, 12288, 14336, 15360}, {0, 0, 0, 0, 0, 0, 8192, 12288, 14336}, {0, 0, 0, 0, 0, 0, 0, 8192, 12288}, {0, 0, 0, 0, 0, 0, 0, 0, 8192}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {18000} }; void setup() {   blinkall(2); // useful for testing } void loop() {   DisplayBitMap(); } void turnon(int led) {   int pospin = ledMap[led][0];   int negpin = ledMap[led][1];   pinMode (pospin, OUTPUT);   pinMode (negpin, OUTPUT);   digitalWrite (pospin, HIGH);   digitalWrite (negpin, LOW); } void alloff() {   DDRD = B00000010;   DDRB = B00000000; } void DisplayBitMap() {   boolean run=true;   byte frame = 0;   byte line = 0;   unsigned long data;   while(run == true) {     for(int i = 0; i < runspeed; i++)     {       for(line = 0; line < 9; line++)       {         data = pgm_read_word_near (&BitMap;[frame][line]);   // fetch data from program memory         if (data==18000){           run=false;         }         else for (byte led=0; led<14; ++led) {           if (data & (1<             turnon((line*14)+led);             delayMicroseconds(blinkdelay);             alloff();           }           else {             delayMicroseconds(blinkdelay);           }         }       }                  } frame++;    } } void blinkall(int numblink) {   alloff();   for(int n = 0;n < numblink;n++)   {     for(int i = 0; i < runspeed; i++)     {       for(int j = 0; j < 126; j++)       {         turnon(j);         delayMicroseconds(blinkdelay);         alloff();       }     }     delay(500);   } }   } }

Question by hydronics   |  last reply


iPhone SDK and version 2.0 beta!

Apple announced the iPhone SDK and version 2.0 for the iPhone coming out in June! Since my friends and I develop software for macs, now we can start developing for iPhone! We are also going to try to be one of the lucky groups that get to beta test version 2.0 with apple's enterprise program which allows some companies to beta test version 2.0 before it gets released to the public! We are going to immediately start work on some iPhone apps, so stay tuned!Our website is www.Xiotios.com

Topic by Einsteins Circuitry 



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


Raspberry pi 2 processing capability?

Hearing the announcement of the new latest and greatest Raspberry Pi 2, now a backwards compatible computer with a 0.9GHz ARM Cortex-A7 quad core processor and 1GB of LPDDR2 SDRAM, I was wondering of the feasibility of using it as a very cheap and basic solution for a simple computer for my lab. Currently, I am using a compaq presario C700 Pentium Dual-Core laptop, that has been maxed out with 2GB 800MHz kingston RAM, and is running Kubuntu. I should also not the HDD has been replaced with a 120GB one from an old and broken Xbox. I do not like it much anymore, because although the performance of it is acceptable, the screen is a bit low res, at 1280x800, it's pretty dark (or at least until it 'warms up' to full brightness), it had a major scratch on the screen, (no idea how it got there) and after buffing it out with many methods, including with an eraser, the area has became discolored, like a portion of the screen has higher gamut and brightness, and lower black levels. :( Oh well. The main killer for it is that it's form factor. It is too big, heavy, the screen is too small, and it is very cumbersome to use far away in the corner of my workbench. Of course being a laptop, the 'base' of it is fixed to the screen, and to move it closer to me takes away lots of valuable space on my really messy bench. I mostly use it to research part numbers, get schematics off of google, watch YT videos, log data from serial ports (including my UNI-T multimeter with basic data-logging capabilities), and stuff like that. I may have as many as 20 tabs open at a time, which did tax my old compaq C700 when it had 1GB of RAM, but that was likely due to a memory leak issue with chrome, since I have the SAME issue with my main desktop, with 8GB of DDR3 RAM. If the video by MAKE is anything to judge, it looks just as powerful, as this embedded video is large! https://www.youtube.com/watch?v=pZz8MW3DSqA My hope is to replace it with a raspberry pi, and be able to use it for these basic operations w/ a old cheap LCD monitor which can be picked up off of craigslist for cheap. Generally old 4:3 monitors go for next to nothing. Maybe I can even find one in the dump :P. Maybe I can configure the GPIO pins to be COM ports, w/ clock and everything else! That way an external FTDI chip and using the limited number of USBs is not an issue. Is that possible?

Question by -max-   |  last reply


Countdown timer doesn't exit and the loop never repeats?

We want to run the stepper motor by 180 degrees and want to repeat it after long delay (say 2 hours or so) with a countdown timer displayed in LCD attached to Arduino. Every thing happening successfully except the loop doesn't start after the countdown ends. #include #include const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution // for your motor // initialize the stepper library on pins 8 through 11: Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); // initialize the library with the numbers of the interface pins LiquidCrystal lcd(7, 6, 5, 4, 3, 2); int hours = 0; // start hours int minutes = 0; //start min int seconds = 10; //start seconds int stepCount = 0;         // number of steps the motor has taken void setup() {   // initialize the serial port:   Serial.begin(9600);   pinMode(13, OUTPUT);   // set up the LCD's number of columns and rows:   lcd.begin(16, 2);   // Print a message to the LCD. } void loop() {   // set the cursor to column 0, line 0   // (note: line 0 is the first row, since counting begins with 0):   lcd.setCursor(0, 0);   lcd.print("DRUM ROTAING");   for (int i = 0; i <= 100; i++) {     // step one step:     myStepper.step(1);     Serial.print("steps:");     Serial.println(stepCount);     stepCount++;     delay(125);   }   lcd.clear();   lcd.setCursor(0, 0);   lcd.begin(16, 2);   lcd.print("Count Down Timer ");   delay(150);   while (hours > 0 || minutes > 0 || seconds >= 0) {     lcd.setCursor(4, 2);     (hours < 10) ? lcd.print("0") : NULL;     lcd.print(hours);     lcd.print(":");     (minutes < 10) ? lcd.print("0") : NULL;     lcd.print(minutes);     lcd.print(":");     (seconds < 10) ? lcd.print("0") : NULL;     lcd.print(seconds);     lcd.display();     stepDown();     delay(1000);   } } void stepDown() {   if (seconds > 0) {     seconds -= 1;   } else {     if (minutes > 0) {       seconds = 59;       minutes -= 1;     } else {       if (hours > 0) {         seconds = 59;         minutes = 59;         hours -= 1;       } else {               }     }   } } We used break, return 0, continue, etc. but somehow didn't work. Kindly tell how to exit so that program repeats itself. Thanks.

Question by meetshivam   |  last reply


Modify this circuit to make it lower voltage? Answered

What resistors do I change in this circuit to make it go red at <3.2V and green at >3.2V ? It is a battery monitor that uses op-amp, 2.5v voltage reference diode, and a 2-pin bi-color LED. The trimpot adjusts the voltage at which the colour changes. http://i48.tinypic.com/28qtb3l.gif

Question by jdorne   |  last reply


Batch Program ideas

Hey everyone! ive made only two batch programs, as you may or may not know. i need ideas, anything that you suggest, i can make!! (no moving games, cant do that) but anything else you want me to make, i can and WILL program it. its your chance to express yourselves, i need ideas!!      *dont give simple ideas, i like chalenges ;)

Topic by Country Boy 97   |  last reply


My instructable has 0 View for about 1 day ! ?

Hi, I know this is a common error but what is the solution ?? 

Question by ram mere   |  last reply


How to control speed motor dc 0-5000rpm with Arduino?

Hello,  please I need help to control the speed of a dc motor with, for ex, Arduino. I need it to set the rotate speed of a device that we use in I+D at the Uni. The roate speed that we use is between 0 to 5000 rpm.  Any idea and help is more than welcome!!!!

Question by marianoaste   |  last reply


Which type of diode for 12v 10amp to 12v 0 amp?

Hi all, wondering if you can offer any advice, I'm making a circuit that has two sub circuits:- circuit 1 10 amp transformer, connected to lights circuit 2 6 amp transformer, connected to lights Both these sub circuits will be bridged to  a large circuit , however  I believe I need a diode that will stops the 6 amp transformer getting to circuit 1, but the transformer from circuit 1 to power the lights in circuit 2. If this is correct could someone advise that type of diode I would need to drop the amps to 0. I'm not sure how diodes work however I'm using led lighting that will run off 5v so I'm aiming to have as close to a one way valve for power. Also will I have to place a diode on both the positive and negative or will one surface? Thanks for any help you can offer

Question by C2L   |  last reply


sys/time.h missing when compiling in MS VC++

I am trying to use opencv for my arduino robot. Here's the problem: when I try to compile?rebuild in VC++, it says that /* * The program used in the YouTube video http://www.youtube.com/watch?v=Gg6zqjDq1ho * * This program allow to rotate a webcam to track an object. This is * done by using Arduino to control a servo motor. The communication * is done using a serial connection (through USB or native). * * To compile it under Linux (assuming OpenCV was previously installed): * *   g++ -O2 -W -Wall -lhighgui tracking.cc -o tracking * * See the documentation to get the Arduino program. * * Author: Frédéric Jolliton * Date: january 22, 2011 * Documentation: http://doc.tuxee.net/tracking */ #include #include #include #include #include //-------- PID parameters -------- // See http://en.wikipedia.org/wiki/PID_controller // These values must be chosen CAREFULLY. The strategy to find good // values is to set `ci' and `cd' to 0.0, then try to find a value of // `cp' that works the best (without too much oscillation) then, from // that, lower `cp' and increase `cd' until the system is able to // stalibilize more quickly. Increase `ci' if the system take time to // move to the target position. There are more complexes method to // find the "right" values. static double cp = 0.2; static double ci = 0.0; static double cd = 0.02; /* * Get the current time in seconds */ static double gettime() {   struct timeval tv;   gettimeofday(&tv;, 0);   return tv.tv_sec + tv.tv_usec / 1e6; } int main() {   CvCapture*          capture = cvCreateCameraCapture(0);   if (capture == 0) {     std::cerr << "Failed to open the camera.\n";     return 1;   }   /*    * Window to display the input image.    */   cvNamedWindow("RGB", CV_WINDOW_AUTOSIZE);   cvMoveWindow("RGB", 0, 0);   /*    * Window to display the mask (the selected part of the input image)    */   cvNamedWindow("Mask", CV_WINDOW_AUTOSIZE);   cvMoveWindow("Mask", 0, 505);   /*    * The settings window    */   cvNamedWindow("Settings", 0);   cvMoveWindow("Settings", 652, 505);   // The hue range to select.   int                 hue_level_start = 0;   int                 hue_level_stop = 12;   cvCreateTrackbar("Hue level (start)", "Settings", &hue;_level_start, 255, 0);   cvCreateTrackbar("Hue level (stop)", "Settings", &hue;_level_stop, 255, 0);   // The minimum saturation level.   int                 sat_level = 100;   cvCreateTrackbar("Saturation level", "Settings", &sat;_level, 255, 0);   // Target position.   int                 target = 320;   cvCreateTrackbar("Target", "Settings", &target;, 640, 0);   /*    * Window to display the tracking state    */   cvNamedWindow("Track", CV_WINDOW_AUTOSIZE);   cvMoveWindow("Track", 646, 0);   FILE*               serial = fopen("/dev/ttyACM0", "w");   if (serial == 0) {     printf("Failed to open serial port\n");   }   sleep(1);   IplImage*           chan1 = 0;   IplImage*           chan2 = 0;   IplImage*           chan3 = 0;   IplImage*           hsv = 0;   IplImage*           monitor = 0;   IplImage*           result = 0;   double              angle = 1500.0; // the position of the camera   int                 tcolor = 0; // target color - Used to switch to predefined hue levels.   double              last_time = 0.0; // last time we updated PID   int                 last_known_x = 320; // last known position of the target.   double              last_error = 0.0;   double              i = 0.0; // integral term (here because it is accumulating)   int                 last_sent_value = -1;   for (int n = 0;; ++n) {     //-------- Get the input image --------     IplImage*           frame = cvQueryFrame(capture);     if (frame == 0) break;     cvShowImage("RGB", frame);     //-------- Allocate images --------     if (hsv == 0) {       // Allocate images if it is the first iteration.       hsv     = cvCreateImage(cvGetSize(frame), 8, 3); // 8 bits, 3 channels       chan1   = cvCreateImage(cvGetSize(frame), 8, 1); // 8 bits, 1 channels       chan2   = cvCreateImage(cvGetSize(frame), 8, 1);       chan3   = cvCreateImage(cvGetSize(frame), 8, 1);       monitor = cvCreateImage(cvGetSize(frame), 8, 3);       result  = cvCreateImage(cvGetSize(frame), 8, 3);     }     //-------- Process the input image --------     cvCvtColor(frame, hsv, CV_BGR2HSV); // convert to HSV (Hue-Saturation-Value)     cvSplit(hsv, chan1, chan2, 0, 0); // extract Hue & Saturation     // Create a mask matching only the selected range of hue values.     if (hue_level_start <= hue_level_stop) {       cvInRangeS(chan1, cvScalar(hue_level_start), cvScalar(hue_level_stop), chan1);     } else {       cvInRangeS(chan1, cvScalar(hue_level_stop), cvScalar(hue_level_start), chan1);       cvSubRS(chan1, cvScalar(255), chan1);     }     // Create a mask matching only the selected saturation levels.     cvCmpS(chan2, sat_level, chan2, CV_CMP_GT); // Test Saturation     cvAnd(chan1, chan2, chan3); // Merge masks     cvErode(chan3, chan3, 0, 2); // Suppress noise     // Find the position (moment) of the selected regions.     CvMoments           moments;     cvMoments(chan3, &moments;, 1);     int                 r = sqrt(moments.m00);     int                 x = moments.m10/moments.m00;     int                 y = moments.m01/moments.m00;     //-------- Mask window --------     // blue = hue selection, green = saturation selection, red = selected regions     cvConvertScale(frame, monitor, .3, 0); // faded out input     cvSet(monitor, cvScalar(255, 0, 0), chan1); // blue overlay     cvSet(monitor, cvScalar(0, 255, 0), chan2); // green overlay     cvSet(monitor, cvScalar(0, 0, 255), chan3); // red overlay     if (x > 0 && y > 0) {       cvCircle(monitor, cvPoint(x, y), r, cvScalar(0, 0, 0), 4, CV_AA, 0);       cvCircle(monitor, cvPoint(x, y), r, cvScalar(255, 255, 255), 2, CV_AA, 0);     }     cvShowImage("Mask", monitor);     //-------- Tracking state --------     cvCopy(frame, result, 0); // input image     cvLine(result, cvPoint(target - 60, 0), cvPoint(target - 60, 480), cvScalar(0, 0, 0), 2);     cvLine(result, cvPoint(target, 0), cvPoint(target, 480), cvScalar(0, 0, 255), 3);     cvLine(result, cvPoint(target + 60, 0), cvPoint(target + 60, 480), cvScalar(0, 0, 0), 2);     if (x > 0 && y > 0) {       cvCircle(result, cvPoint(x, y), 10, cvScalar(0, 0, 0), 6, CV_AA, 0);       cvCircle(result, cvPoint(x, y), 10, cvScalar(0, 255, 255), 4, CV_AA, 0);     }     cvShowImage("Track", result);     //-------- Handle keyboard events --------     int key = cvWaitKey(33);     if (key == 27) break;     switch (key) {     case 'r':       // Reset the current position. This is used to check how fast       // the system can return to the correct position.       angle = 1500;       break;     case 't':       // Quickly switch to a different tracking color (red or blue)       tcolor = 1 - tcolor;       if (tcolor == 0) {         cvSetTrackbarPos("Hue level (start)", "Settings", 0);         cvSetTrackbarPos("Hue level (stop)", "Settings", 12);       } else {         cvSetTrackbarPos("Hue level (start)", "Settings", 109);         cvSetTrackbarPos("Hue level (stop)", "Settings", 116);       }       break;     default:       // ignore other keys.       break;     }     //-------- PID processing --------     // If the object is out of the window, use last known position to     // find it.     if (x < 0 || x > 640) {       x = 2.5 * (last_known_x - 320) + 320;     } else {       last_known_x = x;     }     double              time = gettime();     double              dt = time - last_time;     if (last_time == 0.0)       dt = 1.0;     last_time = time;     // the error we want to correct     double              error = x - target;     // the proportional term     double              p = error * cp;     // update the integral term     i += error * dt * ci;     // Clamp integral term     if (i > 30.0)       i = 30.0;     else if (i < -30.0)       i = -30.0;     // the derivative term     double              d = (error - last_error) / dt * cd;     last_error = error;     // the PID value     double              pid = p + i + d;     // Clamp PID     if (pid < -100)       pid = -100;     else if (pid > 100)       pid = 100;     // Update the position from the PID value.     angle += pid;     // Clamp angle     if (angle < 0)       angle = 0;     else if (angle > 2000)       angle = 2000;     printf("pos = %d, P = %f, I = %f, D = %f, angle = %f, dt = %f\n", x, p, i, d, angle, dt);     //-------- Send the position to Arduino --------     if (serial != 0) {       int                 current_value = angle;       // Send the new position if it changed since the last time.       if (current_value != last_sent_value) {         fprintf(serial, "%d\n", current_value);         printf("SENT %d\n", current_value);         last_sent_value = current_value;       }     }   }   cvReleaseCapture(&capture;); } Here's the problem, when i try to compile/rebuild, it says that 

Question by GraffikeL   |  last reply


Controlling a motor with a touch screen ?

So i am trying to control a motors speed using PWM (running through a transistor). I know how to make that happen but i am unsure how to use a touch screen to control the motor,  I have one of the test codes that is a touch pad 0-9 with enter and clear. I was wondering if there was a way that i can punch the number in push enter and have the motor run at that speed(starting with just 0-255) The touch screen is 3.2LCD TFT Touch Screen SD Reader http://www.ebay.com/itm/SainSmart-Mega2560-3-2-TFT-LCD-Shield-Touch-Screen-SD-Reader-4-Arduino-2560-/280930557613?pt=LH_DefaultDomain_0&hash;=item4168c41ead The code is // ITDB02_Touch_ButtonTest (C)2010 Henning Karlsen // web: http://www.henningkarlsen.com/electronics // Modified to work with UTFT on Mega w/Arduino 1.0.1 (C)2012 Otmar Ebenhoech, // // This program is a quick demo of how create and use buttons. // // This program requires the ITDB02_Graph library (8bit mode) // or ITDB02_Graph16 (16bit mode). // // It is assumed that the ITDB02 module is connected to a // ITDB02 Shield, a ITDB02 Mega Shield or that you know how // to change the pin numbers in the setup. // #include #include // Declare which fonts we will be using extern uint8_t BigFont[]; // Uncomment the next line for Arduino 2009/Uno //UTFT myGLCD(ITDB32S,19,18,17,16);   // Remember to change the model parameter to suit your display module! //ITDB02_Touch  myTouch(15,10,14,9,8); // Uncomment the next line for Arduino Mega UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module! ITDB02_Touch  myTouch(6,5,4,3,2); //// //// ////   ////THIUS IS WHAT I ADDED ETK int motor = 9; ////    //// //// //// int x, y; char stCurrent[20]=""; int stCurrentLen=0; char stLast[20]=""; void setup() {//// //// //// //// tHIS IS WHAT I ADDED ETK pinMode (motor, OUTPUT); //// ////   ////    //// // Initial setup   myGLCD.InitLCD(LANDSCAPE);   myGLCD.clrScr();   myTouch.InitTouch(LANDSCAPE);   myTouch.setPrecision(PREC_MEDIUM);   myGLCD.setFont(BigFont);   myGLCD.setBackColor(0, 0, 255);   // Draw the upper row of buttons   for (x=0; x<5; x++)   {     myGLCD.setColor(0, 0, 255);     myGLCD.fillRoundRect (10+(x*60), 10, 60+(x*60), 60);     myGLCD.setColor(255, 255, 255);     myGLCD.drawRoundRect (10+(x*60), 10, 60+(x*60), 60);     myGLCD.printNumI(x+1, 27+(x*60), 27);   } // Draw the center row of buttons   for (x=0; x<5; x++)   {     myGLCD.setColor(0, 0, 255);     myGLCD.fillRoundRect (10+(x*60), 70, 60+(x*60), 120);     myGLCD.setColor(255, 255, 255);     myGLCD.drawRoundRect (10+(x*60), 70, 60+(x*60), 120);     if (x<4)       myGLCD.printNumI(x+6, 27+(x*60), 87);   }   myGLCD.print("0", 267, 87); // Draw the lower row of buttons   myGLCD.setColor(0, 0, 255);   myGLCD.fillRoundRect (10, 130, 150, 180);   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (10, 130, 150, 180);   myGLCD.print("Clear", 40, 147);   myGLCD.setColor(0, 0, 255);   myGLCD.fillRoundRect (160, 130, 300, 180);   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (160, 130, 300, 180);   myGLCD.print("Enter", 190, 147);   myGLCD.setBackColor (0, 0, 0); } void updateStr(int val) {   if (stCurrentLen<20)   {     stCurrent[stCurrentLen]=val;     stCurrent[stCurrentLen+1]='\0';     stCurrentLen++;     myGLCD.setColor(0, 255, 0);     myGLCD.print(stCurrent, LEFT, 224);   }   else   {     myGLCD.setColor(255, 0, 0);     myGLCD.print("BUFFER FULL!", CENTER, 192);     delay(500);     myGLCD.print("            ", CENTER, 192);     delay(500);     myGLCD.print("BUFFER FULL!", CENTER, 192);     delay(500);     myGLCD.print("            ", CENTER, 192);     myGLCD.setColor(0, 255, 0);   } } // Draw a red frame while a button is touched void waitForIt(int x1, int y1, int x2, int y2) {   myGLCD.setColor(255, 0, 0);   myGLCD.drawRoundRect (x1, y1, x2, y2);   while (myTouch.dataAvailable())     myTouch.read();   myGLCD.setColor(255, 255, 255);   myGLCD.drawRoundRect (x1, y1, x2, y2); } void loop() {   while (true)   {     if (myTouch.dataAvailable())     {       myTouch.read();       x=myTouch.getX();       y=myTouch.getY();             if ((y>=10) && (y<=60))  // Upper row       {         if ((x>=10) && (x<=60))  // Button: 1         {           waitForIt(10, 10, 60, 60);           updateStr('1');         }         if ((x>=70) && (x<=120))  // Button: 2         {           waitForIt(70, 10, 120, 60);           updateStr('2');         }         if ((x>=130) && (x<=180))  // Button: 3         {           waitForIt(130, 10, 180, 60);           updateStr('3');         }         if ((x>=190) && (x<=240))  // Button: 4         {           waitForIt(190, 10, 240, 60);           updateStr('4');         }         if ((x>=250) && (x<=300))  // Button: 5         {           waitForIt(250, 10, 300, 60);           updateStr('5');         }       }       if ((y>=70) && (y<=120))  // Center row       {         if ((x>=10) && (x<=60))  // Button: 6         {           waitForIt(10, 70, 60, 120);           updateStr('6');         }         if ((x>=70) && (x<=120))  // Button: 7         {           waitForIt(70, 70, 120, 120);           updateStr('7');         }         if ((x>=130) && (x<=180))  // Button: 8         {           waitForIt(130, 70, 180, 120);           updateStr('8');         }         if ((x>=190) && (x<=240))  // Button: 9         {           waitForIt(190, 70, 240, 120);           updateStr('9');         }         if ((x>=250) && (x<=300))  // Button: 0         {           waitForIt(250, 70, 300, 120);           updateStr('0');         }       }       if ((y>=130) && (y<=180))  // Upper row       {         if ((x>=10) && (x<=150))  // Button: Clear         {           waitForIt(10, 130, 150, 180);           stCurrent[0]='\0';           stCurrentLen=0;           myGLCD.setColor(0, 0, 0);           myGLCD.fillRect(0, 224, 319, 239);         }         if ((x>=160) && (x<=300))  // Button: Enter         {           waitForIt(160, 130, 300, 180);           if (stCurrentLen>0)           {          for (x=0; x             {               stLast[x]=stCurrent[x];             }             stCurrent[0]='\0';             stCurrentLen=0;             myGLCD.setColor(0, 0, 0);             myGLCD.fillRect(0, 208, 319, 239);             myGLCD.setColor(0, 255, 0);             myGLCD.print(stLast, LEFT, 208);             ////             ////              ////             ////THIS IS WAHT I ADDED ETK             analogWrite(motor,stLast);             ////             ////              ////             ////           }           else           {             myGLCD.setColor(255, 0, 0);             myGLCD.print("BUFFER EMPTY", CENTER, 192);             delay(500);             myGLCD.print("            ", CENTER, 192);             delay(500);             myGLCD.print("BUFFER EMPTY", CENTER, 192);             delay(500);             myGLCD.print("            ", CENTER, 192);             myGLCD.setColor(0, 255, 0);           }         }       }     }   } } The stuff i added has these //// on top and bottom with a comment "THIS WAS ADDED  ETK" the part that dont work is "analogWrite(motor,stLast);" and stLast is a char so it give me char to int error. And as you can tell i am no good at this so anything that can point me in the right direction would be greatly appreciated ETK

Question by etkoehn 


Need help with Arduino. Xbees won't connect when I upload my code?

I am working on a RC Gripper lifter that works with 2 Servos and 2 DC motors. For wireless control I am using a Series 1 configured Xbee. Now the problem is that the Xbees don't connect when I upload the code. They do connect if I upload some other small code. Here's the Sender Code int potGripper = 1;   int potLifter = 2;   //int oldGripper = 0;   int newGripper = 0;   //int oldLifter = 0;   int newLifter = 0;   int midPin = 2;   int leftPin = 3;   int newGear =0;   int oldGear=1; void setup() {   Serial.begin(9600); pinMode(midPin, INPUT); pinMode(leftPin, INPUT); pinMode(potGripper, INPUT); pinMode(potLifter, INPUT); } void loop() {   if ( digitalRead(midPin) == LOW)   {      oldGear = 1;   }   else if ( digitalRead(leftPin) == LOW)   {       oldGear = 2;   }     int oldGripper = analogRead(potGripper);   int oldLifter = analogRead(potLifter);   int Grippervalue = map(oldGripper,0,1023,0,9);   int Liftervalue = map(oldLifter,0,1023,0,9);   if(newGripper != Grippervalue)   {     Serial.println('!');     Serial.println(Grippervalue);     Serial.println('#');     newGripper = Grippervalue;   }   else if(newLifter != Liftervalue)   {     Serial.println('@');     Serial.println(Liftervalue);     Serial.println('#');     newLifter = Liftervalue;   }   else if( newGear != oldGear)   {     Serial.println(';');     Serial.println(oldGear);     Serial.println('#');     newGear = oldGear;   }   delay(500); } And here's the receiver code- #include //If serial dsn't work as expected, add  while(Serial.available()>0) Serial.read(); at end of each loop! int gripperPin = 9; int lifterPin = 10; int rpmData = 0; int motorLeft, motorRight, gripperData, lifterData, angle, flag; Servo myGripper; Servo myLifter; void setup() {   Serial.begin(9600);   myGripper.attach(gripperPin);   myLifter.attach(lifterPin);   delay(500); } void loop() {   while( Serial.available() == 0);   int data = Serial.read() - '0'; if (data >=0)   {     if(data == ';') // For setting the motor RPM     {       rpmData= Serial.read() - '0';       if (rpmData == 0)       {        motorLeft= 300;        motorRight= 250;       }       else if (rpmData == 1)       {         motorLeft= 200;         motorRight= 150;       }     }     if (data == '!') // For the Gripper     {       gripperData = Serial.read() - '0';       angle= map(gripperData, 0, 9, 0, 80);       myGripper.write(angle);      }     if (data == '@') // For the Lifter     {       lifterData = Serial.read() - '0';       angle= map(lifterData, 0, 9, 0, 160);       myLifter.write(angle);     }     //if (data == '%') // For the Buttons      if (data == '#') // For marking end of Serial Data      {       flag = 0;      }      }     } My main aim is to send a value between 0-9 from one arduino to another so that I can map it on the other arduino from 0-160 and 0-80 (I am using 2 servos). I have used a symbol to differentiate the values from each other so that the correct value reaches the desired servo/motor. Please help me figure out my mistake..

Question by ReshamP   |  last reply


arduino button problems, again

I have a problem with two buttons and a RGB LED. I want the two buttons to be pressed and then the brightness decreases/increases but it isn't working. When i press it, it decreases it but then it doesn't do it again. Any help would be appreciated. Code included below (problem is in bold) : int button = 8; int button_two = 7; int redPin = 6; int greenPin = 5; int bluePin = 3; int val = 0; int val_two = 0; int numb = 0; int r = 0; int g = 0; int b = 0; int i = 0; void setup() {   pinMode(redPin, OUTPUT);   pinMode(greenPin, OUTPUT);   pinMode(bluePin, OUTPUT);   pinMode(button, INPUT);   pinMode(button_two, INPUT);   Serial.begin(9600); } void loop() {   val = digitalRead(button);   val_two = digitalRead(button_two);     if (val == HIGH && val_two == LOW && numb < 7) {     numb++;     delay(300);     } else if (val_two == HIGH && val == LOW && numb > 1) {     numb--;     delay(300);     } else {     numb=numb;   }     if (numb == 1){       r = 255;       g = 255;       b = 255;   }   if (numb == 2){       r = 255;       g = 0;       b = 0;   }   if (numb == 3){       r = 0;       g = 255;       b = 0;   }   if (numb == 4){       r = 0;       g = 0;       b = 255;   }   if (numb == 5){       r = 255;       g = 255;       b = 0;   }    if (numb == 6){       r = 255;       g = 0;       b = 255;   }    if (numb == 7){       r = 0;       g = 255;       b = 255;   }   if (val == HIGH && val_two == HIGH) {       int r_cal = r / 5;     int g_cal = g / 5;     int b_cal = b / 5;         r = r - r_cal;     g = g - g_cal;     b = b - b_cal;   Serial.println(r);   Serial.println(g);   Serial.println(b);   delay(300);   } else {     val == LOW;     val_two == LOW;   }   analogWrite(redPin, r);   analogWrite(greenPin, g);   analogWrite(bluePin, b); }

Topic by Isaac Emery 


can i get the circuit diagram of a variable 0-12vdc motor drive circuit using 741IC?

I've made a dc drive circuit using bridge rectifier and 3 741IC op-amp circiut, but the problem is im getting 0-18v across the pot instead of 0-12v.. Canyone suggest how to rectify this problem ? 

Question by sumantharisthus   |  last reply


why i get the following error 'QTR_NO_EMITTER_PIN' was not declared in this scope?

Here is my code: #include #define NUM_SENSORS   1     // number of sensors used #define TIMEOUT       2500  // waits for 2500 us for sensor outputs to go low #define DETECT_LEVEL  150   // Sensor needs to change this amount for detection #define TRIGGER_COUNT 10    // Wait n successive readings valid detection // Create instance of sensors. We are only using one sensor connected to pin 12 PololuQTRSensorsRC qtrrc((unsigned char[]){12}, NUM_SENSORS,TIMEOUT,QTR_NO_EMITTER_PIN); unsigned int sensorValues[NUM_SENSORS]; unsigned int sensorValuesBase[NUM_SENSORS]; unsigned int detect_count[NUM_SENSORS];    // Number of successive times sensor                                            // has detected a drop in value. If                                            // this is greater than trigger_count                                            // then white line detected // Setup pins for SN754410 Motor chip int lf = 6;      // Left motor Forward int lr = 5;      // Left motor Reverse int rf = 11;     // Right motor Forward int rr = 10;     // Right motor Reverse int led = 3;    // LED and resistor across pins 2 and 3 int led_gnd = 2; unsigned char line_detect=1; unsigned char do_turn=0; void setup()  {   pinMode(led, OUTPUT);   pinMode(led_gnd, OUTPUT);     digitalWrite(led_gnd, LOW);    // LED ground     pinMode(13, OUTPUT);   digitalWrite(13, HIGH);        // turn on Sensor   //Read and store the baseline values   qtrrc.read(sensorValues);    sensorValuesBase[0] = sensorValues[0];    } void loop()  {     if(line_detect==1){       // Line Detect is enabled     qtrrc.read(sensorValues);     if(sensorValues[0] < (sensorValuesBase[0]- DETECT_LEVEL)) {       // Detected drop on value - brighter object detected       detect_count[0]++;   // incerment count       if(detect_count[0] >= TRIGGER_COUNT) {         // White Line detected         detect_count[0]=0;          // Reset count         do_turn=1;                  // Start the turn         digitalWrite(led, HIGH);    // turn on LED              line_detect=0;              // Turn off detection until turn complete               // Come to s stop         analogWrite(lf, 0);                 analogWrite(rf, 0);         analogWrite(lr, 0);                 analogWrite(rr, 0);              delay(200);            }      }     else {       detect_count[0]=0;     }    }   if(do_turn==1){     //Turn right a bit to avoid obstacle     analogWrite(lr, 0);         analogWrite(rf, 0);     analogWrite(lf, 200);     analogWrite(rr, 200);           delay(500);                // Turn for half a second     line_detect=1;             // turn line_detect back on     do_turn=0;                 // turn off     digitalWrite(led, LOW);    // turn off Led   }   else {     // go forward until we detect something     // Forward     analogWrite(lr, 0);             analogWrite(rr, 0);     analogWrite(lf, 250);             analogWrite(rf, 250);       } } i add the library and it appear in sketch import library?

Question by hayhackerall   |  last reply


how to make an RC delay to led (not flashing) ? Answered

How to make an RC delay to led (not flashing) ? i have 3 leds and i want them to light up in sequence once they are powered and they keep lighting without flashing for example second 0 > 1 0 0 second 1 > 1 1 0 second 2 > 1 1 1

Question by aessam1   |  last reply


how to write a program to control switch and LED

This program is based on How to Program Switch and LED Connected with PIC16F877A. http://www.kynix.com/BlogImage/9.4.7.png    The following code demonstrate, how to write a program that scan the switch status and turn on and off LED. The switch is connected at PORTE bit-0 and LED connected on PORTB bit-0. When switch is read as high state, the LED is turn-on and when switch state is low, LED is turn-off. The switch debouncing rate is 5msec. The code is written in “mikroC PRO for PIC v.5.6.1” IDE and simulation is done with Proteus 8.0 SP0.  PIC16F877A-I/L Datasheet Code in mikroC [code] // switch connected on porte #define SW_AT_PORT PORTE // debounce rate 5msec #define DBOUNCE_RATE 5 // direction signal sbit LED_dir at TRISB.B0; sbit SW_dir at TRISE.B0; // bit labels portb sbit LED at PORTB.B0; sbit SW at PORTE.B0; // old state save flag bit oldstate_one_to_zero; bit oldstate_zero_to_one; void main(void) { // set porta and porte as digital ADCON1 = 0x06; // set direction as output LED_dir = 0; // set direction as input SW_dir = 1; // init LED LED = 0; // init old state flag oldstate_one_to_zero = 0; oldstate_zero_to_one = 0; while(1) { // Detect logical one if(Button(&SW;_AT_PORT, 0, DBOUNCE_RATE, 1)) { // Update flag oldstate_one_to_zero = 1; } // Detect one-to-zero transition if (oldstate_one_to_zero && Button(&SW;_AT_PORT, 0, DBOUNCE_RATE, 0)) { // Update flag oldstate_one_to_zero = 0; // LED ON LED = SW; } // Detect logical zero if(Button(&SW;_AT_PORT, 0, DBOUNCE_RATE, 0)) { // Update flag oldstate_zero_to_one = 1; } // Detect zero-to-one transition if (oldstate_zero_to_one && Button(&SW;_AT_PORT, 0, DBOUNCE_RATE, 1)) { // Update flag oldstate_zero_to_one = 0; // LED OFF LED = SW; } }} [/code]

Topic by narne   |  last reply