Skip to content

KOSASIH/pi-supernode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge CI

ISO 9001:2015 ISO 27001:2013 ISO 14001:2015 CMMI Level 3 ITIL COBIT HIPAA PCI-DSS SOC 2 SOC 3 GDPR CCPA NIST Cybersecurity Framework OWASP CSA STAR FedRAMP SOC 1 ISO 20000 ISO 22301 PCI-DSS HIPAA ISO 27017 ISO 27018 NIST 800-53 NIST 800-171 FedRAMP Moderate FedRAMP High

Pi Network Raspberry Pi Raspberry Pi Zero Epaper Badge

pi-supernode by KOSASIH is licensed under Creative Commons Attribution 4.0 International

pi-supernode

This repository contains the source code for a simple Node.js application that runs on a Raspberry Pi. The application listens for incoming HTTP requests and responds with a message indicating the current temperature and uptime of the Raspberry Pi.

Prerequisites

To run this application, you will need the following:

  1. A Raspberry Pi with Node.js installed
  2. A temperature sensor (such as a DS18B20) connected to the Raspberry Pi

Getting Started

  1. Clone this repository to your Raspberry Pi:
1. https://github.com/KOSASIH/pi-supernode
  1. Install the required dependencies:
1. cd pi-node
2. npm install
  1. Edit the config.js file to specify the temperature sensor's device file path. For example, if you're using a DS18B20 connected to GPIO pin 4, the device file path will be /sys/bus/w1/devices/28-000005f8b8ff/w1_slave.

  2. Start the application:

1. npm start
  1. Use a web browser or a tool like curl to send an HTTP request to the Raspberry Pi and view the response:
1. curl http://<RASPBERRY_PI_IP_ADDRESS>:3000

The response will look something like this:

1. Temperature: 23.5°C, Uptime: 1 day, 2 hours, 34 minutes, 56 seconds

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Source code for a simple Node.js application that runs on a Raspberry Pi.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.4%
  • JavaScript 13.6%
  • Java 4.1%
  • C++ 1.8%
  • Go 1.5%
  • Shell 1.4%
  • Other 2.2%