2

I want to control my RPI from my phone, so I decided that the RPI will host a site. I'm familiar with ROR and I saw that there is GPIO gem (pi piper).

Should I work with ROR or learn Django and use python's stable module instead?

Bex
2,9293 gold badges27 silver badges34 bronze badges
asked Apr 12, 2015 at 16:33

2 Answers 2

2

You can use that gem as far as it will do whatever you want to do; it is obviously unmaintained now and doesn't include, e.g., I2C support.1 However, I notice there may be some other generic ruby modules for I2C on linux (they do not have to be specifically for the pi).

Much of the GPIO functionality can be controlled via the /sys/class/gpio interface, which does not require any module; you are just reading from and writing to file nodes the kernel presents to userland. Basic documentation for that is here; you may find further explanations online but it is really very simple.

Note that that interface does not allow you to do certain things, such as activate internal pull-up/down resistors (but I think the pi_piper module does). You have not said what it is you are actually trying to do, so you may or may not require that.


1. It also may not work, or work completely, on the A+/B+ or pi 2.

answered Apr 13, 2015 at 14:15
1
  • I want something to control my garden from my phone. So I need also ORM for saving some data Commented Apr 17, 2015 at 12:23
2

From your comments above, the gem sounds unmaintained, while RPi.gpio looks to be active.

Depending on the complexity of your web application, you may be able to get up and running much faster with a microframework like flask.

answered Aug 13, 2015 at 12:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.