Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Sam Baines
Sam Baines
4,315 Points

Which track to take if I want to build a web app that interfaces with hardware

Hi - I want to know what the best track to start on is for developing a web app that can talk to hardware like a raspberry pi to control hardware connected to it aka LEDs, etc - a kind of IoT set-up?

I have a basic understanding of HTML & CSS but will brush up my front end dev too.

But what is a better track - ruby rails? php? python? or a combination?

Thanks

5 Answers

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

I don't think that Treehouse has any tracks or courses with a language that can talk to hardware. And what do you mean by "talk"? Is it kind of like what is shown in this video at about 1:10?

Sam Baines
Sam Baines
4,315 Points

Hey Caleb thanks for the response - when I say "talk" what I mean is if you press a button on a web app for say setting an LED color, which then changes an LED on a piece of hardware to specified color, if that makes sense. I was under the impression that python is the programming language for a Raspberry Pi computer which can be used to control such pieces of hardware through its GPIO. So I feel like I am going to need to learn a few tracks like ruby rails for the web app and maybe some Python or similar for the actual control.

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

Okay, that makes sense. I'm not sure what is used for that kind of thing, sorry.

Juan Aviles
Juan Aviles
12,795 Points

I believe Sam wants to interact remotely with his Raspberry Pi. I've never seen a track here on Treehouse which address' this directly, but I would start with a strong understanding of Python which you should already be somewhat familiar with if you own a Pi. I'm also interested in doing exactly what Sam is talking about (for Arduino's as well as Pi's) so I'll be watching this question closely.

Sam Baines
Sam Baines
4,315 Points

Hi Juan - Like you I believe it must be the python track that gives the basic understanding for the programming for the interfacing with hardware but then I think something like rails or php might be the best application building languages to control the raw python code remotely.

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Sam, Rails might, but PHP is back-end language used for web development; when PHP is sent to the server it is compiled into HTML, so you might be able to use it for talking to hardware but I don't think so.

Sam Baines
Sam Baines
4,315 Points

Ok gotchya - thanks Caleb.

Sam Baines
Sam Baines
4,315 Points

Just for an update (mainly for Juan) - I have looked into this a lot more this evening and found some useful starting points for things to learn to be able to do what I set out in the question above. Apparently Javascript can be very useful for this, mainly in the form of Node.js - a website I found recommended learning MongoDB (which I presume is just another database package), HTML5 and Websockets (Mozilla Developer Network). So at least we have a starting point.

cecil merrell
cecil merrell
6,873 Points

try python, you can create a web-based front-end kind of admin panel that also can directly interface with hardware.