Let's Make Robots!

XMOS - Tutorials

My XMOS entry was to create tutorials that not only taught how to use the XMOS but also lead up to explaining complicated robotic principles as well as good coding standards. So far I have been trying to figure out what to make a tutorial about. Below is my list which I will add or subtract from depending on the XK1's capabilities and the complexity of the tutorial. My goal is to break them into small chunks that can be digested in less than 30 minutes (5-10 minutes of first read through followed by some do it yourself time and possibly another 10-20 minutes of re-reading for comprehension). Here is the list. Feel free to make suggestions if something you have learned or want to learn isn't included.

  1. Hook up the XMOS and get an LED blinking
  2. Flash LED in morse code "SOS"
  3. LEDs doing 8-bit binary counting
  4. LED Dice
  5. 7 segment LED display (7 LEDs to display a grapical representation of a 1 digit #)
  6. Servo and motor introductions
  7. Motor Driver introduction
  8. Motor Driver w/ second power source (possible first robot to drive around)
  9. Ultrasonic and IR rangefinders to make project above not run into stuff
  10. Line Sensors to make robot above follow a line
  11. Make your own h bridge and use as a motor driver
  12. PWM -software and hardware
  13. Charlieplexing
  14. Encoder beginner
  15. Encoders Quadrature
  16. P Control
  17. PI Control
  18. PID Control
  19. Localization
  20. Wave Front

Along the way items such as resistors, capacitors, transistors and OHMs law will be covered as well as I can explain it. I am a CS guy not an EE so I will need help from others to ensure I am explaining things in a way that is accurate ;) My #1 goal is to teach the above principals as well as good coding standards, the electrical stuff will be explained the best I can...

My hope is to duplicate the tutorials using an Arduino Mega and Picaxe where possible. Picaxe may not handle wave front, quadrature, etc.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

But personally I would remove 3 and 4 since to me they seem irrelevant once you have done the previous LED experiments. Also in 2 I would expect a version using active waiting and a version using timers and interrupts just to show the difference. I also really feel that there needs to be a short intro to driving LCD displays since these are quite popular in robotics.

But I think it's a great idea and I'd be happy to peer review chunks. I'm a CS guy myself so we should be on the same level :-).

Cheers, Jimmy

The 20 items you mentioned are all great. However I think one important thing is missing: COMMUNICATION. How to communicate by serial. Using cable and/or various wireless options such as bluetooth or RC units like this

PS: I'm still curious to know whether the X-mos has any libraries for eg. controlling servos and stuff or whether you're supposed do all this from scratch?!

xmos has a tutorial for uart communication that you could check out.

I'm kinda curious about libraries as well....I'm a bit surprised that they don't have some simple ones.

They do have these though

Thanks for the link...

And yeah it seems to be lacking both a servo lib. and a PWM lib. (eg. for dc motors).

On the other hand I wont be venturing into the X-mos universe for some months, and they may be added by then. However it does seem like the next natural step for me (being a programmer).

But I may just start buying my own Atmega chips and programming them using the AVR platform instead. Or for instance these  Atmega1280 breakout boards:

atmega1280mcu_150.jpg

I really like those. That's basically the power of a Mega board in sub-matchbox size. Plus you exploit the MCU's capability better if you skip the Arduino platform and program them directly in their "native" tongue.

Anyway that's for the future. For now I'm pretty content playing with my Arduino :)

Nice, I've never seen those chips set up like that....thats pretty damn sweet...

Now the funny thing is that they are looking a lot like the old procs for computers with the way they have the pins set up.  :D

 Edit: do you have the link where you found those? the one supplied goes to LMR....but I'm already here!!!  :D

I provided a bad link above. Here is the real one:

www.paltronix.com/bigavr2.htm

But there are lots around, though most are for the Atmega128 NOT the Atmega1280, so they can't be used with the Arduino platform as is (I think). That's why I bookmarked this link in particular. However if you don't wanna use it as an Arduino the Atmega128 will serve you well too.

Anyway try googling "Atmega128 breakout"...

np, and thanks for the link/hints on the search, These would be great to get a hold of in this form!

 

 

..I think I'm in love too ;)

The strange thing is everbody seems to be making standalone Arduinos using 168 and 328 chips (I'll be buying a few myself soon), but nobody seems to have tried making a standalone Mega using these things?! I spent quite a bit of time looking around for it...

PS: Check out this one (128). It has fewer pins than the other one BUT it only costs $16.51 :D

EDIT: To jklug80: Just realized..sorry for spamming your X-mos thread with my rambeling on about (wheel) encoders and Atmega chips. I'll stop now :/

Was going to edit one of my posts so I wouldn't have to put an additional one in....Last one for me too JK!!

Anyway, this is a better bit of source for the uart com with the xmos, it also has config settings for baud rate.

I plan to hack this one up and get rid of most of the extraneous functions that I don't need. 

That 128 is awesome btw..  :D

I'd like to see some tutorials on how to connect other stuff to the XK-1.  Memory cards.  :)

Although, this isn't really a tutorial, but some tips on how to find connectors to  attach to the XK-1 would be nice.  :)