Question for #programming #robotics #RaspberryPi people
I want to start getting into robotics and have a general familiarity with several levels of programming, but am not even remotely an expert in any of them and have very little EE experience. What resources would you recommend?
@daHob Why an Arduino?
@InspectorCaracal cheap microcontrollers with tons and tons of hobbits support. You can get the board and a kit with breadboard and components to do stuff for less than $50.
@daHob Okay, let me try that question again. >.> Why are you specifically suggesting an Arduino over a Raspberry Pi?
@daHob Like, not what are the general advantages of an Arduino, what are the specific advantages to a RasPi
@daHob (Assume that I know virtually nothing about Raspberry Pi except that people have used it for robotics <.<)
@InspectorCaracal raspberry pi is a full blown computer. The Arduino is a simpler microcontroller.
@InspectorCaracal the arduino has basically no OS. You flash the memory and it runs one program.
@daHob So a RasPi robot is more like a computer with a bunch of custom peripherals?
@daHob Cool, thank you! :D I will look into Arduino stuff
@InspectorCaracal let me know if you do. It's really cool how quickly you can get some stuff wired up!
@daHob ooh the language is based on C, that'll make it easy for me to pick up
@InspectorCaracal yeah, you should have no problems at all.
@InspectorCaracal adafruit is the "official" company, but the arduino standard is open sourced. You can find a lot of stuff at SparkFun too
@daHob so this may be a Dumb Question, but, how hard do you think it'd be to expand the memory capacity of an arduino system? I've just done some cursory reading so far but it SEEMS like you should be able to do an effectively arbitrary amount of memory, but I don't know if memory addressing would be limited by the design of the microcontroller or if you can do it yourself.
@InspectorCaracal um, I'm not sure you can? It's literally a single chip solution with RAM and flash ROM onboard.
@InspectorCaracal um, you could probably hook up an SD card for data storage of something?
@InspectorCaracal also ordering little servos and sensors and wifi chIps from eBay. Super cheap
@InspectorCaracal I mean, if you looked, you could probably get both for less than $50. The actual microcontroller for the arduino I got off eBay from China for like $3 each. (You also need a couple capacitors and a 16mhz clock crystal)
@InspectorCaracal raspberry pi typically runs a Linux distro
@InspectorCaracal also, there are numerous books, site and resources with sample projects
@InspectorCaracal but really there are many different kits. Grab one that you like and work out turning in some LEDs, running some servos and reading some sensors. Then you'll have a good idea what you can do?
@InspectorCaracal I would skip both RPi and Arduino and go for a decent microcontroller from TI (MSP430, or Tiva if you need more power and/or ethernet). Learning curve will be slightly higher, but you'll get tons more out of the process. You'll learn a lot just reading the user guide for the chip. I haven't touched the actual PCB design process, etc etc as much as others, so I'll leave that for them. I do second the idea of getting some sensors and whatnot to talk to via common protocols like >
@InspectorCaracal SPI, I2C, etc.
If you -do- want something linux computer-y, I'd recommend the beaglebone black because it's a much more open platform and has simple, fast peripheral processors you can use for embedded communication tasks. The university I graduated from built a portable microwave camera with one at the core https://hackaday.com/2014/06/22/an-introduction-to-the-beaglebone-pru/
@InspectorCaracal Err, someone there I mean.
One other thing that makes me inclined to push you away from arduino is debugging -- you will have a relatively difficult time getting the level of debugging info you would working at a lower level if you use Arduino, and it will mean less to you. IME this becomes an issue pretty fast...
Even if you went with, say, straight arm-none-eabi-gcc or mspgcc you would have better options like attaching to openocd or mspdebug with gdb
@mhu2141ai I have to admit, I was really surprised to see that Arduino uses C++, I expected a much lower-level language.
@InspectorCaracal With all of the eclipse-based IDEs like TI's code composer studio it's very easy to do things like setting breakpoints, inspecting register contents and processor stae...
At least when people around me used the Arduino-like software for TI uC (energia), they had a much harder time getting that info and things definitely suffered for it
@mhu2141ai My current leanings after reading a bit about Arduino would be that if I went with it, to ignore the official IDE completely and use an Eclipse plugin for it or something, which sounds like it might be a sort of midpoint between going full Arduino and what you're suggesting?
@InspectorCaracal Got a link to the plugin? If it's what I'm looking at then that sounds fairly similar. Just so long as it doesn't do things like making analog-to-digital conversions look like you're reading GPIO
@mhu2141ai I do not! I just saw that there is such a thing. >.>
@InspectorCaracal Fair enough! If it's just avr-gcc integration with eclipse, sounds about like what you'd get with most other microcontrollers (CCS itself is basically eclipse with a bunch of TI things thrown in, and IIRC freescale does similar too)
@mhu2141ai I'll keep that in mind when looking into the details, thank you!
@InspectorCaracal Sorry if this is a bit of an info dump, hopefully it's useful...
@mhu2141ai I love info dumps in response to my requests for info. 8D
@InspectorCaracal Actually last thing I promise -- if you're doing a lot of embedded comm and can't figure out why something isn't working, it helps -enormously- to have a logic analyzer. Many FPGA-based ones (e.g. saleae) are really expensive, but there's a chip called the Cypress FX2LP that's found its way into a lot of inexpensive Chinese clones of the first-gen Saleae. There's good open-source support for FX2 LAs https://sigrok.org/wiki/Fx2lafw and the speed limitation prob won't matter for >
@InspectorCaracal most basic embedded communication you'll be doing
@djsundog @InspectorCaracal @inmysocks I'd suggest picking an application and getting involved with a particular robotics community. For example nano sumo robots (25g) at RoboGames, cocktail robots at Roboexotica and DNA lounge, soccer robots at RoboCup.
@zuz @inmysocks @djsundog Oooh, now THAT'S an interesting direction to start from which I hadn't thought of.
@InspectorCaracal the quickest way to start is probably to use a raspberry pi with raspbian on it and connect and arduino to it using Johnny five. You can code everything in node and there is a lot of documentation.
Johnny five is a bit limited but it is a good start to understand what is going on.
@InspectorCaracal or you can put Johnny five on an arduino and just control it from your computer and skip the raspberry pi if you don't need a mobile robot.
@inmysocks > code everything in node

@InspectorCaracal python and c are also options that have good documentation and help, but node has the most that I have seen. If you want python than raspberry pi is a better option and if you prefer c than arduino is a better option. Arduino is more low level so you can do some things that you can't on a pi but you probably won't run into that unless you are doing timing critical sensor stuff.
@inmysocks What sort of things are timing-critical sensor stuff?
@InspectorCaracal the only thing that I have run into is driving motors for autonomous navigation. There may be a bit of delay if you use a pi, but it is rarely noticeable .
@inmysocks Ah! Well, autonomous navigation is up there on my list of things I would want to do. :3
@InspectorCaracal I've been getting into robotics with ROS for the past year, perhaps I can help
@InspectorCaracal you want to get into circuit making stuff? Grab an Arduino. Also, tons of stuff on YouTube.