more Pi (Raspberry Pi)

Psi*

Tech Monkey
10 amazing Raspberry Pi-based Kickstarter projects

More tantalizing add-on widgets for the Pi are here.

These are starting to make programming this thing look almost easy. I dare not invest because my ideas are ... if not nefarious ... then illegal:eek:
 

Tharic-Nar

Senior Editor
Staff member
Moderator
Then it's probably for the best that you ignore Adafruit, terrible, terrible things might happen...

http://www.adafruit.com/category/105

Beagglebone and Arduino... terrible terrible things.

It's sad really, I haven't been able to carry on with my projects for a while. Now that I have some free time again, I may just have to start experimenting again.

If you are familiar with C++, then you may find Arduino a good match, since 'Processing' - what the main IDE for Arduino uses, is heavily derived from C and C++. Programming is still my biggest weakness but the electronics I find significantly easier.

Just be aware of some of the Raspberry Pi's weaknesses... namely, it's lack of precise timing. You'd still need to hook it up to a uC to drive motors with PWM and such.
 

Psi*

Tech Monkey
C++ takes the fog away from seemingly complex programming projects. I bought a book on C++ just before a friend of mine went in for surgery. I needed to be by her side, but knew that I was not going to be busy 24x7. I just needed to be available 24x7. During those many available hours I studied C & C++ and got it! You just need to be able focus on that topic for a few days. It does not mean that you cannot attend to the rest of the noise of life in that time. By the time you are done, people will have just begun to think that you have been bitten by something.

There must be a few good current books available on scientific applications of C++. "Scientific" is easily extendable to measurement and device control.

I think my primary hesitation from jumping in, is that I want to use open or free development methods. Figuring out the least painful GNU compiler installations ... I just do not have the fortitude for at the moment.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
You could always start with the RPi's native language of Python, then you don't need to worry about a compiler. Perusing the RPi forum would list a variety of development environments too - or even just the RPi distro, Rasbian, would have everything ready - providing you have an RPi. If you want to give Python a miss for the time being, there is a sub-forum dedicated to C/C++, including how to use cross-compilers. http://www.raspberrypi.org/phpBB3/viewforum.php?f=33&sid=802e8fce864b41105d9a0316dda620b6

As for my foray into programming, I do have at my disposal the K&R standard C Reference book, that I just never got around to studying. Maybe it would be time to blow the cobwebs off and actually do something. The only real issue is figuring out what it is I want to do with it after. I need a project/goal to work towards in order for it to stick, and not some silly traffic-light simulation or poker game.

I don't have any novice level C++ books though, but I do have a couple Python ebooks. I did take a stab at Java a few years ago... that was... a trial of patience and frustration (horrible language to learn, syntax heavy and seemingly simple things have complex code). As a novice though, this was to be expected I guess.

The other problem of picking a language is also about preventing myself from picking up bad habits. There are a growing number of people, some of whom I've tried to glean advice from, told me to avoid C and its derivatives, so that I don't fall into the same hole as many others and then struggle to grasp concepts as OO and Parallel processing.

Inevitably, I fall into Analysis Paralysis. Sometimes, I need a good kick to get me going.
 

Psi*

Tech Monkey
hahaha ... "Analysis Paralysis" ... I relate :( Thanks for the link.

Writing much code in C is frustrating. For many applications you get lost in a sea of parenthesis. But it is the primary language to understand.

Using C++ overloaded operators and device drivers with constructors/destructors can eliminate confusion so well that reading thru the logic of a machine control program is nearly English.

If you ever get so motivated, definitely work with the fundamentals of C. Understand pointers, incrementing/decrementing and figure out an intelligent style that you can remember and stick with. Just write simple specific small programs.

With the Pi figure out how to make LEDs blink. This is almost like writing the C program to write "hello". Then think about all of these I/O opportunities. How should they be initialized ... every time (constructor). When finished with, what state should they be in? (destructor). In between, what form do you want the I/O so that you can tell what it is about? You could use a name for each bit for instance versus a byte that you have to use logical bit operations to determine what is set and not. Or, name the bits so that in the main routine is more readable about what is the intent.

A little carried away. This is me getting me more interested. But once you have C++ a little bit understood, then writing the logic for some interesting tasks becomes so much more fun.

Personally, I am thinking about communications between Pi's. I would like to be able to directly share memory as used in master/slave. Not via a bus, but wired USB initially with RF not via USB later. Thinking.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
You could just share over Ethernet via a switch, or an Ad-Hoc system with USB Wi-Fi dongles. Something tells me though, that you'll probably be more interested in the RPi supercomputer with most of the instructions on how to put it together, here. There is a research paper on the system, but it's behind a paywall. You can get the details and other links from here.
 
Top