JJRobots COMMUNITY

Full Version: B-Robot on Arduino uno
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to build B-robot using Atmega328 chip. How i need to change motor ports and what about timers configuration? I do not use wifi and ultrasonic sensors. Interesting only balancing algorhytm and motor controls. Can somebody help me?
Hi Max,
The B-robot code uses the two TIMERS of the Arduino Leonardo at the same time, so you would need the same Atmega processor that the Arduino Leonardo mounts or modify the code
Timers is no problem. You can use only one timer if you want.
(11-05-2015 04:44 PM)sasa999 Wrote: [ -> ]Timers is no problem. You can use only one timer if you want.

Timer1 or Timer2?
Timer0 and timer2 are 8bit timer, where timer1 is a 16bit timer.
Why do you wany use Uno and change code? Why not ProMicro?
(11-05-2015 10:48 PM)sasa999 Wrote: [ -> ]Timer0 and timer2 are 8bit timer, where timer1 is a 16bit timer.
Why do you wany use Uno and change code? Why not ProMicro?

Because UNO is more cheaper and normally we have several in the desk.
(11-06-2015 09:13 AM)legin.37 Wrote: [ -> ]Because UNO is more cheaper ...
More cheaper!!!??? Huh
ProMicro is for 4$. That is less than cost petrol for driving to nearest storeSmile
http://www.ebay.com/itm/New-Pro-Micro-AT...SwPgxVNhve

Any way, it is up to you, use Uno or other board.
i am already made the cirquit and pcb using atmega328p. just have a lot of those chips in my house. So only the code part must be modified. Trying to adapt code by my own, but get stacked. My knowledge is not enough.

what ports i can use for stepper control in atmega 328 and what timer?

eX-robot uses only one timer1 in to control both motors and ultrasonic sensor. Timer1 is 16 bit timer. on atmega 328 timer1 also 16 bit. maybe i can use his code and just change ports and pins config?
(11-06-2015 09:21 AM)sasa999 Wrote: [ -> ]
(11-06-2015 09:13 AM)legin.37 Wrote: [ -> ]Because UNO is more cheaper ...
More cheaper!!!??? Huh
ProMicro is for 4$. That is less than cost petrol for driving to nearest storeSmile
http://www.ebay.com/itm/New-Pro-Micro-AT...SwPgxVNhve

Any way, it is up to you, use Uno or other board.

Sorry, IĀ“did want to say "more cheaper than Leonardo", but the cost its not the reason. Really the reason is that I have two UNO on the desk without use. Big GrinBig Grin
(11-06-2015 09:47 AM)MaxMagic1986 Wrote: [ -> ]i am already made the cirquit and pcb using atmega328p. just have a lot of those chips in my house. So only the code part must be modified. Trying to adapt code by my own, but get stacked. My knowledge is not enough.

what ports i can use for stepper control in atmega 328 and what timer?

eX-robot uses only one timer1 in to control both motors and ultrasonic sensor. Timer1 is 16 bit timer. on atmega 328 timer1 also 16 bit. maybe i can use his code and just change ports and pins config?

Good day, MaxMagic1986.
Please see the differences in the operation of the timer1 for ATmega328P and ATmega32u4.

Arduino UNO (pinout & function pin)
[Image: atmega328_qtfp.jpg]


Arduino Leonardo & Pro Micro (pinout & function pin)
[Image: atmel-atmega32u4-pinout-diagram.png]

I'll try to help you this weekend.
Pages: 1 2
Reference URL's