Tag Archives: Arduino

DFRobot Shield library for LCD Keypad Shield from DX

If you have ordered “LCD Keypad Shield for Arduino Duemilanove & LCD 1602” from DealExtreme and are wondering about how to get this thing working without datasheet, you are in the right place ūüôā

This product seems to be very similar(!) a product called “DFRobot LCD Keypad Shield for Arduino” and the Datasheet and even a library (LCD4bit_mod) for easy programming of it is available at following link, http://www.robotshop.com/dfrobot-lcd-keypad-shield-arduino.html,¬†under useful links.

The only issue with the library is that this is built for old versions of Arduino and if one to make it work with newest version (Arduino 1.0), then some parts of the code should change. First you need to install the additional library in your Arduino on your computer (by copying the content of the zip file in the “libraries” folder of Arduino program). Afterwards one should change the content of LCD4bit_mod.cpp¬†

Continue reading DFRobot Shield library for LCD Keypad Shield from DX

Arduino Mega 2560 driver could not be found on Windows 7

Issue: Arduino Mega 2560 driver could not be found on Windows 7
Solution:¬†Simply go to¬†Start¬†– right click on¬†Computer¬†–¬†Properties¬†¬†Device Manager–¬†¬†Under¬†Other Devices,¬†Find¬†Arduino Mega 256¬†– right click and choose¬†update driver¬†– Choose¬†Browse computer for driver software¬†– Click¬†Browse¬†and Navigate to your¬†Arduino home folder(where you installed Arduino)¬†and choose¬†drivers¬†folder and ¬†click Next. The windows 7 would find the right driver inside the folder.

Happy coding with Arduino ūüôā

Arduino Mega 2560 driver issue on Windows 7

Issue: Arduino Mega 2560 driver could not be found on Windows 7
Solution: Simply go to Start – right click on Computer – Properties – Device Manager – Under Other Devices, Find Arduino Mega 256 – right click and choose update driver – Choose Browse computer for driver software – Click Browse and Navigate to your Arduino home folder(where you installed Arduino) and choose drivers folder and click Next. The windows 7 would find the right driver inside the folder.

Happy coding with Arduino ūüôā

Arduino Ethernet shield problem when on External Power

When Arduino/ethernet shield is connected with an external voltage source I have to press reset button to make it work. But when I use it with the USB source everything works fine. This code is not exactly pretty, but it solves the problem of the need to restart on Ethernet shield startup. Open relay and hooked the coil pins to ground and digital pin 02, and the switched pins to ground and the reset pin. The trick is to before initializing the Ethernet library, check an address in EEPROM. If the flag is 0, we set it to 1 and then trigger the relay, and the unit resets. If the flag is 1, we assume that we just did a warm reset and set the flag back to 0, for next time we power up.

<pre>int relayPin = 02;
int addr = 128;

void eepThang() {
eep_value = EEPROM.read(addr);
if (eep_value == 1) {
Serial.println("already reset. writing 0");
EEPROM.write(addr, 0);
else {
Serial.println("not reset.. writing 1, restarting");
EEPROM.write(addr, 1);
Serial.println("done wrote… here we go");
digitalWrite(relayPin, HIGH);

source : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225354009/15

Processing, the key for Arduino board independent programming

When it comes to Arduino, there are several ways to do things. Using simple Arduino IDE to communicate with the board through serial port. Write a Java program to do it, or maybe do send orders to Arduino through your program that is not uploaded on Arduino card and can be changed anytime without even updating the pde file on the board. The tool that gives you  the power to do this is called Processing & the library used exactly for Arduino is called StandardFirmdata. The very good thing about Processing is that it is based on Java and all Java codes works right out of the box on it. You can also import processing libraries into your Java framwork and enjoy the power of processing right in the middle of your Java project(in Eclipse).

The instruction to get Processing & Arduino talk together :

  1. Download this file.
  2. Unzip the library and copy the “arduino” folder into the “libraries” sub-folder of your Processing Sketchbook. (You can find the location of your Sketchbook by opening the Processing Preferences. If you haven’t made a “libraries” sub-folder, create one.)
  3. Run Arduino, open the Examples > Firmata > StandardFirmata sketch, and upload it to the Arduino board.
  4. Configure Processing for serial:http://processing.org/reference/libraries/serial/
  5. In Processing, open one of the examples that comes with with the Arduino library(in the same folder that we just unzipped).
  6. Edit the example code to select the correct serial port.
  7. Run the example.