[WIP] Talk to me - A little Arduino project. (Last edit: 28.10.2010)
(Note: This is currently really only a very short guide I can expand at a later date hopefully)
I recently purchased an Arduino board. Since I had also an LCD, I also wanted to work with.
After some training I was also, for example, "Sending texts via serial port to the Arduino board. Since the idea was already there: do not send me messages over the Internet to the LCD.
the idea is not new, I've seen this somewhere once. However, I wanted to try it again.
Since I have no Ethernet Shield, the board must remain on the PC via USB, communication takes place via serial interface. The Board must therefore depend on the USB all the time.
I actually work on my document would work, only a (very short) presentation:
What is required?
hardware First you need a board. I use the Arduino Duemilanove. Who uses the older Diecimila is even better off - see below why. Furthermore
need an LCD (any work should, if it can be controlled by liquid crystal-library), possibly a diode (I have here a 1N4007).
A potentiometer for contrast adjustment should also be present.
Who has a board with auto reset, also needs a 110 ~ 120 Ohm resistor. (2x 220 Ohm parallel do it too).
(edit, 09/09/2010)
Fritzing was thanks to you I can make my circuit available:
for the construction of the circuit as seen above.
Furthermore, I refer here to
http://arduino.cc/en/Tutorial/LiquidCrystal and
http://www.ladyada.net/learn/lcd/charlcd.html . Read the pinout of the LCD in any case the sheet.
Mine LCD tolerate example, only 4.2 volts at the input of the backlight pins. Therefore, I need the diode to runterzubekommen the voltage from 5V to 4.3V. (If you wish, you can also build a voltage divider with a second pot, so you can adjust the brightness).
Revisited Auto Reset: If you by echo data to / dev/ttyUSB0 sent to reset the board, the result is that the message at the end is not displayed on the LCD. Therefore, the reset pin must have a 110 ohm resistance is connected to 5V. If the resistance is larger, the board resets anyway, it is smaller, you may zerschießt your board (thanks to the folks at arduino.cc Forum)
This naturally leads to the fact that Arduino (IDE) for programming the board not reset automatically. So the resistance in programming or remove manually reset. (. Anyway I have to remove the 5V plug-in programming since the programmer is not otherwise available)
As noted above, the older Diecimila not have a car and do not need the reset.
software I report here only on Linux. I have no idea how to directly send data grouped into Windows COM port via the command line. VII. so what can someone help. Furthermore, it should
on your PC to a web server with PHP support have. I've run here Lampp.
Arduino development environment should be installed if you know how, you can also rumhacken directly in Emacs, all by avr-gcc compile and burn it with avrdude (Arduino development environment does nothing).
Here is the code of the sketch:
http://c.pastebin.com/niFH8DSC I'm here with my 16x2 LCD pin configuration. How the LCD object must be initialized, is also on the arduino.cc page.
If you have a 4-line LCD, you can customize the source code of course.
Bash script:
http://pastebin.com/aLSvEgEt The Bash script checks the text file in which the messages are written using PHP.
The bash script might have to be supplemented, so that at the beginning of / dev / port with ttyUSB a baud is initialized from 9600th Use the command
stty-F / dev/ttyUSB0 9600
will be executed first. Incorrect baud out anyway to the wrong character on the display
Finally, check the pages for the web server:
Form:
http://pastebin.com/Lw1qv8bp And the page that processes the data:
http:// pastebin.com/y84K80Zx It is recommended if necessary to protect the form with a Captcha or install other protective measures. Contain solutions, it can happen that one will zugespammt. With curl it is possible, data on forms (both POST and GET) to send.
If I have forgotten in my hurry what, just be happy ^ ^
Here is a picture of the result. Here you can also see something of the same wiring, the + pin is 5V, the pin to GND logically