So here is my first attempt at micros with an ATTiny85 controlling a Max7219 display driver. These tutorials came in handy: http://tronixstuff.wordpress.com/2010/07/09/review-maxim-max7219-led-display-driver-ic/ http://tronixstuff.wordpress.com/2011/11/23/using-an-attiny-as-an-arduino/
Update: due to its sunny disposition i have decided to name it: Elder Price.
Line follower, maze solver
Actuators / output devices: Tamiya Gearbox
Control method: autonomous
CPU: attiny85
Power source: 6xAA
Programming language: Arduino
Sensors / input devices: Line sensor with 2 IR photodiodes
Target environment: indoor flat surfaces
This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/elder-price
sortof, i kinda cannibalised
sortof, i kinda cannibalised an example from the tutorial.
http://tronixstuff.files.wordpress.com/2010/07/max7219matrixdemo.pdf
u have to define letters like this:
byte a[5]={ B01110000,B10001000,B11111000,B10001000,B10001000 };
and display them like this:
lc.clearDisplay(0); lc.setRow(0,0,a[0]); lc.setRow(0,1,a[1]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[3]); lc.setRow(0,4,a[4]); delay(delaytime);
kind of allot of code so it limits what you can do on a little 85…
be sure to check the
be sure to check the tutorial link, theres a library involved n stuff…
lumi
February 5, 2012, 9:42pm
4
Cool, want to do something
Cool, want to do something with the ATTiny85 too since I got a bunch of them and want to order more.
My problems are, that I not got the serial command working. Is there any trick to get this done?
If you don’t mind please write more here, wordpress is blocked in China
A minor point.
Your code could be condensed a smidgen.
lc.clearDisplay(0); for (iint i=0;i<5;i++) { lc.setRow(0,i,a[i]); }
delay(delaytime);
I don’t know if your code size would be any smaller though. I will leave that for you to figure out.
well i just followed the
well i just followed the tutorial, here is another copy of it:
http://hlt.media.mit.edu/?p=1229
just install the software into arduino IDE, then upload the isp sketch to your board. and you are ready to connect attiny and upload code to it.
to get it to work with the max7219 i just connected it like this: Data in (1) -> pin0 (physical pin 5) Load (12) -> pin1 (physical pin 6) Clock (13) -> pin2 (physical pin 7)
only change i needed to make in the code was to define these pins. i imagine it doesnt matter which pins you use.
for the max7219 i used this library: http://arduino.cc/playground/uploads/Main/LedControl.zip from this page: http://www.arduino.cc/playground/Main/LedControl#Source
kewl, ill have to try that
kewl, ill have to try that out, thxz
Really cool!
Smart robot! Good job Davey!
lumi
February 6, 2012, 11:10pm
10
Thanks Dj. I already
Thanks Dj. I already programmed ATTiny’s successful with this tutorial. See here: https://www.robotshop.com/letsmakerobots/node/30719
I will give it a shot tonight and report back if I got the serial command working.
keep in mind that there are
keep in mind that there are 2 versions of that tutorial. one for Arduino 0.22, and one for the 1.0 release.
oh and if using an Uno, there needs to be a 10uf cap between ground and reset for some reason.
cheers!
finally! a robot! this is cool! i really like the LED face