Advertisement

My first Arduino nice

Started by September 23, 2015 03:12 AM
19 comments, last by SillyCow 9 years, 4 months ago

One of the features of microcontroller design is the reliability of timing and the ease you can do it. Can you get something like the Pi to act reliably in real time with consistent task cycles? Sure, but it is a lot more work and there are a lot more things that can 'go wrong' on you and effectively snag things up. This usually isn't an issue when you're dealing with a task that is relying on just one controller, but rather tends to come into play more when you have a bunch of them handling different parts of a much larger system that needs to work in sync.

You can get around the timing thing with more work and sometimes more hardware/sensor checks, but having helped retrofit an industrial system to use 'modern' computer hardware I have to say that there is a kind of elegance to the timing factor of microcontrollers, and stepping out of that can quickly cause a project to snowball into a nightmare of implicit sync controls and error checking that 'just happened' by design of the original system we were replacing.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

I'm playing around with an Arduino at the moment:

I've worked with some low profile microcontrolers at work before. Using Arduino now at home. Having loads of fun...

Regarding price: Just order a knock-off board. You can get the most sophisticated models for ~10$.

Regarding value, I think the real value is:

1. The breadboard like connectors, which require no soldering

2. The loads of easy to use libraries. (libraries for other boards are not easy to use)

3. The out-of the box usb power supply. (don't get me started on getting a stable power supply for other reference boards )

4. The people selling hardware modules on the internet.

5. The community of beginners around it.

The bad stuff:

1. The IDE is useless compared to professional embedded IDEs i've seen

2. If this is a beginner's board, I'd expect more safties agains burning stuff out.

3. I'ts underpowered: Would it hurt to put 1MB of ram on it?

4. The low power consumption: Not really low compared to "real" embedded boards

5. C is not a good programming language for beginners. I've used some boards which support higher languages. They had more RAM, but that brings me back to #3.

Regarding rasPi: I just don't get it... If You're going to spend 60$ on a board with high power consumption: Why not get an android-on-a-stick? You can program it in Java, and it has a full network stack and USB ports. And for under 50$ you get a cheap tablet with a screen and a big-ass battery. You can program it in JAVA and C++ out of the box, and add just about anything else on top. What possible use case is there for using a rasPi?!?!?

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

Advertisement

With regards to the Android-on-a-stick vs the Pi or similar SoC board, I would have to say that the big difference is the communities and the IO. The Raspberry Pi was developed before there was any real easy access to such cheap and powerful small systems like that, and it was designed as an educational tool. Does it cost more than some other options? Sure, but it is also designed to do a whole lot more a whole lot easier than anything that is actually cheaper than it that I've seen.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
Regarding rasPi: I just don't get it... If You're going to spend 60$ on a board with high power consumption: Why not get an android-on-a-stick? You can program it in Java, and it has a full network stack and USB ports. And for under 50$ you get a cheap tablet with a screen and a big-ass battery. You can program it in JAVA and C++ out of the box, and add just about anything else on top. What possible use case is there for using a rasPi?!?!?

The reason for Raspberry is surely that it has a community as huge as Arduino, and it allows at least some easy, and mostly safe tinkering. But it is a kind of "real" computer. Can connect a screen and a keyboard, and a mouse.

As opposed to the Odroid which I bought, which has a rather modest, small community. It is "mostly compatible" to RasPI on its I/O ports (but what does "mostly" mean?).

On the other hand, and that was the selling argument for me, it has 2GB of DDR3 RAM, and gigabit ethernet (with a real controller, not going over USB), and the CPU is... well, for something so small, and for 70€, it's peeeeooooooiwwwwwwwingggg.... just fucking cool.

You can program in Java if you want, but you also have a fully functional (two, actually... gcc and clang) C++ compiler, including cross-compilers. Or Python if you want, or anything. It runs Ubuntu Mate 15.04, so basically anything that you have under Ubuntu, you can use. I currently have it connected headless via gigabit ethernet, using NoMachine NX for access. Looks and feels totally like a real computer.

Oh, and it has support for emmc (that's micro-sdhc on steroids). I must admit that I didn't even know such a thing existed.

But good grief, it's fast...


root@odroid:/# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   2010 MB in  2.00 seconds = 1006.89 MB/sec
 Timing buffered disk reads: 424 MB in  3.01 seconds = 140.88 MB/sec

Compare that to the 15 MB/s that you get out of micro-sdhc.


You can program in Java if you want, but you also have a fully functional (two, actually... gcc and clang) C++ compiler, including cross-compilers. Or Python if you want, or anything. It runs Ubuntu Mate 15.04, so basically anything that you have under Ubuntu, you can use. I currently have it connected headless via gigabit ethernet, using NoMachine NX for access. Looks and feels totally like a real computer.

As opposed to the device you've listed above

This is the part I don't get about the Pi. Hardware is hard for people who have never done it. Arduinos make hardware easier, by allowing fast hookups and ready made S/W drivers for many peripherals, and a stable power supply and OTAP.

On the other hand: Software is hard for people who have never done it, and RasPis make that easy because: .... ... ... help me out here...

Why not use a PC? It's much simpler to connect to a screen. If it's a laptop it already has a screen. Who wants to get started off with programming in C? Who wants to get to know embedded linux as a first OS? It seems like hipster programming: Let's make a device that looks like an old "Sinclair". Well... Old Sinclairs ran BASIC, not C.

Honest disclosure: As an experienced software developer, the prospect of a beginner's H/W device is much more appealing to the likes of me. I am not your natural customer for a beginner's programming platform. So maybe I'm not in a good position to judge in the first place.

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

With all the tutorials and such online and the easy access to the IO pins on the Pi, what exactly is hard about dealing with beginner hardware on the Pi?

One of the biggest fears people who aren't technically inclined have when it comes to learning to use computers is breaking them, or screwing something up. And if you get playing around with hardware controllers (which modern PCs don't really have all that easy access to) then you run the risk of screwing something up with a short and blowing your whole main computer.

If something goes wrong with your Pi you just pull the plug and reboot it. If it still is going wrong you go to your 'real' computer, and make a new install on the SD card. If something goes REALLY wrong, well then the worst you're likely to do is blow out a computer that cost you less than $100.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
Advertisement

This is the part I don't get about the Pi. Hardware is hard for people who have never done it. Arduinos make hardware easier, by allowing fast hookups and ready made S/W drivers for many peripherals, and a stable power supply and OTAP.

On the other hand: Software is hard for people who have never done it, and RasPis make that easy because: .... ... ... help me out here...

Why not use a PC? It's much simpler to connect to a screen. If it's a laptop it already has a screen. Who wants to get started off with programming in C? Who wants to get to know embedded linux as a first OS? It seems like hipster programming: Let's make a device that looks like an old "Sinclair". Well... Old Sinclairs ran BASIC, not C.

Honest disclosure: As an experienced software developer, the prospect of a beginner's H/W device is much more appealing to the likes of me. I am not your natural customer for a beginner's programming platform. So maybe I'm not in a good position to judge in the first place.

Pi's are the spiritual successor to the BBC Micro, which had lots of I/O ports, not the Spectrum.

You're not the target market for a Pi. Think a 12 year old kid who wants to try programming and has been inspired by seeing some devices people have built with sensors. Her not technically aware parents won't let her plug a circuit she's made into a computer costing a several $100s[1] in case she breaks it but persuading them to let her try it with one costing a few $10s is much more likely. The fact that so many of them have been bought by middle aged men who used Beebs at school just means that the Raspberry Pi Foundation had more money to spend on it's educational initiatives. ;)

Pis where originally envisaged to have Python as their main programming language and most of the learning resources created by the Foundation is geared towards that language, with Scratch as an easier introduction for younger kids.

For a programming novice, hardware programming on a Pi is easier than on an Arduino because of the development environments available. You can even do GPIO programming in Scratch now too - which has to be the most novice friendly way available.


[1] Even if it provided access to GPIO ports - find a desktop or laptop even does that.

Cool.

I wasn't aware that people are using RasPis for hardware control. I thought that that was what Arduinos are for.

To be honest, the guys around me have been using it as a small computer with a keyboard and a mouse, and nothing more.

I couldn't understand the excitement...

Using it as a high profile replacement for an Arduino seems like a much more logical use case.

Heck, even as I was messing about with my own Arduino, I was scared to burn out my PC through my USB port. I burnt out a few LEDS, because I'm rubbish with current-resistance calculations. Got that burnt plastic smell, and started sniffing around my PC. Luckily for me, it was just the LEDS. Almost had a heart attack.

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

I'm currently on an (undisclosed) project using PIs, they were the perfect price/power compromise for us (arduino was way way too underpowered, PI 2 was close enough to a PC for our use case and small enough). It's a middle ground between raw hardware and full computer.

Heck, even as I was messing about with my own Arduino, I was scared to burn out my PC through my USB port. I burnt out a few LEDS, because I'm rubbish with current-resistance calculations. Got that burnt plastic smell, and started sniffing around my PC. Luckily for me, it was just the LEDS. Almost had a heart attack.
Hahahaha, that could be me! But yeah, sure is better to fry a 10€ circuit than to fry a 1,000€ circuit.

This topic is closed to new replies.

Advertisement