jngnyc
Posts: 1
Joined: Tue Aug 12, 2014 3:36 am

RPi for prototyping, then micro-controller for "deployment"?

Tue Aug 12, 2014 12:28 pm

Hello all,

I am new to RPi, so, apologies in advance the n00b question.

Is it possible to "port" a RPi python project to a more compact embedded micro-controller form factor?

I'm interested in using the RPi as a platform for prototyping and debugging my own embedded projects (sensing, etc).
However, I'm a bit stuck on what comes next.... ie: what happens after I am done prototyping and debugging.

Let's use an example.
I am in the process of building a simple open-fridge-door-sensor with my RPi.
IF/when I complete it... it'll work great .... but I'm sure a few fellas on the board here will empathize when I say this:
the whole setup with the RPi w/ power cable hanging off attached to the fridge door is not something the girlfriend/wife will love. :D :cry:

A bit of googling revealed that "AVR" programming (http://www.avrfreaks.net/) is quite popular...
but AVRs, along with most other micro-controllers execute compiled C code,
whereas RPi executes Python code on top of a a fully fleshed out Linux distro.
Fundamental mismatch there...

SO... my questions are as follows:
1) Is using the RPi as a prototyping platform common?
2) Is it common for people to try and port a RPi project to something a bit more form-factor friendly? (FYI, I absolutely understand that you can't just "port" a RPi project that has hardware specific dependencies to something with much fewer IO pins....)
2a) IF uncommon, is it possible? Any guides/projects people can point me to?
3) Am I completely barking up the wrong tree?

Thanks in advance everyone!

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: RPi for prototyping, then micro-controller for "deployme

Tue Aug 12, 2014 4:52 pm

You hit the nail on the head: these are totally different platforms. It's way beyond the scope of a forum reply to detail the advantages/disadvantages of each, but some googling can help you with that. I assume you know that the microcontrollers you have referred to are commonly used in Arduinos, so a search of Arduino compared with Raspberry Pi will get you a bajillion hits.

As far as your form factor is concerned -- pull the Pi off the fridge, put it in a case, and run wires to wherever you want it. They make many pretty cases that will allow you to use your code as it exists without rewriting it for a microncontroller.

Cheers,
C
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

User avatar
mikronauts
Posts: 2740
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: RPi for prototyping, then micro-controller for "deployme

Tue Aug 12, 2014 5:02 pm

Check out

http://micropython.org/

If you limit your development to the subset of Python it executes, and you do not need Linux provided device drivers etc it may work for you.

For low volume / quick turn-around development I tend to use the Parallax Propeller, for high volume, whatever will give me the lowest BOM cost that can run the intended app :)
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

rgrbic
Posts: 128
Joined: Thu Jun 12, 2014 1:07 pm
Contact: Website

Re: RPi for prototyping, then micro-controller for "deployme

Tue Aug 12, 2014 5:40 pm

I would use some microcontroller development board instead of prototyping on RPi since they are quite different.
At 127.0.0.1
Twitter: @rgrbic
IoT-projects.com

Return to “Automation, sensing and robotics”