Woot! Pics and vid up later!
Here's some pics of the touchscreen arduino. The code needs some serious optimization, however, as it's kind of buggy and the mouse doesn't move smoothly. Should be a rather easy fix, just need to throw out the first 1-3 samples when a user starts touching the screen, and the last 1-3 samples before they stop touching the screen. That should hopefully clean it up somewhat. Also need to exclude outlier X&Y results.
[ame]http://www.youtube.com/watch?v=unugcaJwGFs[/ame]
Image Previews:
Schematics:
The first image is the original, and the second is the one I modified (used mspaint). The second one includes the AREF pin hooked up to +5v source and two 3.3v zener diodes for V-USB compatibility with most computers.
Source:
You can find the source here: here (I did not write it, I'm merely mirroring it. Code is from sparkfun.com). The code was originally written for the ATMEGA168, but should work with the ATMEGA 328. If you're flashing the 168, you'll most likely run into the same issues with your computer not recognizing the V-USB on the microcontroller with basic avrdude command due to fuse burn settings, so try this
Code:avrdude -c usbtiny -B 1600 -patmega168 -U flash:w:main.hex -U hfuse:w:0xde:m -U lfuse:w:0xdf:m






). The second one includes the AREF pin hooked up to +5v source and two 3.3v zener diodes for V-USB compatibility with most computers.


Reply With Quote






