Category: Hardware

My Dev Env – remote access to a Raspberry Pi

You have three UI options for logging into your Raspberry Pi:
1. The “standard” way: connect a USB keyboard and HDMI monitor directly to the Pi.
2. connect a PC or Mac to the Pi by plugging a USB-to-serial console cable like the Adafruit 954 into the Pi’s GPIO header, and use the Terminal app on your laptop to connect and login to the Pi as described here.
3. connect your Pi to your local network and then use the SSH app on your Mac to open a remote session on the Pi as described here.
I  use all three methods, and each has its benefits in different situations.
Once I’ve initially setup my Pi for networking using option 1 or 2, I find the third option – connecting via LAN – most flexible, since it doesn’t require the Pi to be tethered to my Mac or any other equipment. I can power up the Pi on my workbench, and as soon as it’s connected itself to the WiFi, I can SSH into it from anywhere in the house. Or even over the Internet if I open a port in my router for the purpose.

Continue reading

REST API on a Pi, Part 2: control your GPIO I/O ports over the internet

In Part 1 of this series, we built a simple REST API in JavaScript on our Raspberry Pi.
One of the most useful reasons for providing your Raspberry Pi with a REST API is to expose its input and output ports via the Internet for remote monitoring and control. This will allow you to control your RPi’s inputs and outputs from the browser on any smartphone or PC wherever you are in the world.
So now we will do just this, extending our REST API implementation from part 1 to read and display digital input ports.

Continue reading

How to build a REST Web API on a Raspberry PI in JavaScript

One of the most useful reasons for providing your Raspberry Pi with a REST API is to expose its inputs and outputs to a web client (on any iPhone, laptop or desktop PC anywhere in the world) for remote monitoring and/or control. This is part 1 of a 2 part blog showing how to implement a REST API in JavaScript.

Continue reading