49 ms·
This is a topic I've been interested in for some time now and this looks to be at the right level (i.e. absolute beginner) for me, so thanks very much for shari
by lylejohnson 14y ago
This is a topic I've been interested in for some time now and this looks to be at the right level (i.e. absolute beginner) for me, so thanks very much for sharing.
Can anyone point me to a similar resource for the Raspberry Pi?
- achalkley 14y agoI got my 5 yo daughter a Pi but I think there's several more layers of complexity (and purchases) to get it going with hardware hacking. It's a more fully fledged computer and can get people started with basic programming with Scratch, then on to things like Python and then C if you dare :) I went to a hacker space open house in Orlando (FamiLAB) and a colleague and I were asking whats the difference between a Pi and an Arduino and a guy said what do you want to do and I said make an LED flash...And he said to start with an Arduino and I can see why now, if you want to get in to electronics (and you already have a computer) an Arduino is the way to go. A Raspberry Pi is a fully functional computer so you have to wait for it to boot in to linux before it can do any other tasks. An Arduino is (almost) instantly on and running you program. Both are great teaching and learning tools but it depends what you want to do with them.
- Joeboy 14y ago> A Raspberry Pi is a fully functional computer so you have to wait for it to boot in to linux before it can do any other tasks. There's nothing to stop you programming the pi bare metal style like an arduino. It's not as well documented but it's perfectly doable and quite fun. https://github.com/dwelch67/raspberrypi https://github.com/dwelch67/raspberrypi http://www.raspberrypi.org/phpBB3/viewforum.php?f=72 http://www.raspberrypi.org/phpBB3/viewforum.php?f=72
- achalkley 14y agoHow awesome! I didn't know that :)
- tmuir 14y agoThis is true of any processor. If you had the inclination and the proper hardware to facilitate loading the machine instructions, you could program the processor in your computer the same way. The raspberry pi is a much more complex machine than the arduino. 32 bit instructions vs 8 bit, 700MHz vs 20MHz clock frequency, GPU vs no GPU, 512MB memory vs less than 1MB. There is so much going on in the pi's chip, that a thorough technical reference manual could easily exceed 5000 pages, where as everything you need to know about the arduino's processor will fit in less than 500. You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial.
- Joeboy 14y ago> The raspberry pi is a much more complex machine than the arduino. 32 bit instructions vs 8 bit, 700MHz vs 20MHz clock frequency, GPU vs no GPU, 512MB memory vs less than 1MB I have no arduino experience and am happy to be educated, but I don't see how any of those things makes the pi harder to program. Maybe the instruction set's harder, but that only matters if you're writing asm. There's more stuff you can do, but that doesn't get in the way if you just want to code arduino-like stuff. > You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial. Here is some baremetal code that blinks LEDs on a pi: https://github.com/dwelch67/raspberrypi/blob/master/blinker01/blinker01.c https://github.com/dwelch67/raspberrypi/blob/master/blinker0... It's not that bad, really. Admittedly some of the peripherals are much harder work than that. I should add that I have nothing against the Arduino, but as a n00b to baremetal / embedded style programming I'm not finding the pi particularly gruelling. Maybe I just don't know what I'm missing.
- tmuir 14y agoI haven't actually worked with the raspberry pi, but I'm currently working with a similar processor, a Texas Instruments ARM Cortex A8 that runs at 720MHz. On my processor, you have to set up the PLL to take the 24MHz external oscillator to 720MHz, configure several clocks for peripherals, set up the MMU with a huge table of memory addresses and their cache settings, configure the GPIO bank, Select the proper multiplexed setting for the actual pin that the signal is output to, etc. This is all in C as well. Are you saying that the code you linked is loaded with some sort of JTAG device, and is the entirety of the code running on the chip, or is it run from the command line? Maybe Texas Instruments are just a bunch of sadists.
- joshj19 14y agoI'm assuming you want to do some low-level hardware integration with your Pi, in which case I would suggest starting by taking a look at this page: http://elinux.org/RPi_Low-level_peripherals http://elinux.org/RPi_Low-level_peripherals It provides some information on how to interface with the GPIO pins with a multitude of programming languages. Granted it may not be an absolute beginner guide, it still has a lot of useful information. If I can find another guide I'll comment back here. I'd also want to echo something that the other reply to your comment mentioned, which is that you should seriously consider starting with an Arduino if you want to do some lower-level programming/interfacing with hardware. From my personal experience, there's a little more documentation on that sort of thing with Arduino than the Raspberry Pi. Additionally, the Raspberry Pi's GPIO pins are not fault tolerant, which means you could damage your Pi if you wire up your hardware improperly. If I remember correctly, Arduinos typically have some voltage fault tolerance (at least there are variants which do), and even if you fry the actual microcontroller chip on the board, it can be removed and replaced for a couple of dollars. Once you've got some experience on an Arduino board, then I'd recommend doing some of the low-level stuff on the Raspberry Pi.