/raspberry-pi-relay-api

Raspberry Pi Node.js Project using relays and a basic API as a demo for Fundamental JS Meetup San Diego January 2020

Primary LanguageJavaScriptMIT LicenseMIT

Raspberry Pi Relay API

This is a Node.js project for the Raspberry Pi. It uses a relay hat to independently control three light bulbs.

Each bulb can be switched on and off through a simple HTTP POST API, which also allows the current status of each bulb to be retrieved.

There is a simple HTML front end that allows the user to see and change the state of each bulb.

This project was put together for the San Diego JS Fundamental JS Meetup group in January 2020. Fundamental JS aims to explore vanilla JavaScript with minimal use of frameworks, so this project doesn't use any Node or front end frameworks apart from the npm package used to control the relays via the Pi's GPIO ports.

Read the full blog post with video on my website!

Hardware used for this: