10

I hate nodejs but it seems like the best way to control GPIO on a raspberry pi from a webserver

Comments
  • 0
    http://webiopi.trouch.com is in python, I remember doing great stuff with it, with custom control panels too, like a remote for an RC car :)
  • 2
    @JoshBent I was trying to get that working earlier but for some reason when I started the server it threw loads of errors at me - just the default server
  • 0
    @j4cobgarby tried searching them? probably missing dependencies, but I think the site had a full tutorial to get everything setup, with all its needed components
  • 0
    @j4cobgarby I think that was the tutorial that was popular back then: https://youtu.be/wGahWkjettw hopefully it still applies as both raspi and webiopi have moved since then
  • 3
    @JoshBent thanks a lot :) I'll certainly have a look at that tomorrow, but I'm going to sleep now
    Anyway, I'm not gonna use node- the node_modules folder made me shudder and I deleted it, so I'm probably going to use PHP to call python
  • 1
    You can use Flask along with GPIO Zero. I used them in one of my RPi projects, it was super simple to setup and worked great.
  • 1
    @j4cobgarby I forgot to mention that you can use Ngrok to assign a public domain to your localhost server started by Flask, and you can use that to send and receive data to/from your RPi.
    Here's the link to the project I mentioned above: https://github.com/RaspberrySense/...
  • 1
    I don't see why you'd hate NodeJS but it is a great way of controlling gpio on a raspberry. Look for a library called Johnny five
  • 3
    Eh. I done it with PHP but you're better off doing it with node. Sockets for the win
    https://github.com/chickenTikkaMasa...
    https://github.com/chickenTikkaMasa...

    These are some experiments I did with raspberry pi, GPIO and PHP
Add Comment