Skip to content

Instantly share code, notes, and snippets.

View futureshocked's full-sized avatar

Peter Dalmaris futureshocked

View GitHub Profile
@futureshocked
futureshocked / rf24_receiver.service
Created March 5, 2020 22:21
Start the rf24 listener script as a service at startup
# Start the rf24 listener script as a service at startup
# Copy this file into /etc/systemd/system as root, for example:
# sudo cp myscript.service /etc/systemd/system/rf24_receiver.service
# Once this has been copied, you can attempt to start the service using the following command:
# sudo systemctl start rf24_receiver.service
# Stop it using following command:
# sudo systemctl stop rf24_receiver.service
# When you are happy that this starts and stops your app, you can have it start automatically on reboot by using this command:
# sudo systemctl enable rf24_receiver.service
@futureshocked
futureshocked / User_Setup.h
Created March 9, 2020 02:14
Peter's User_Setup.h file from ESP32 Unleashed
// Course location: https://techexplorations.com/so/esp32uev/
// USER DEFINED SETTINGS
// Set driver type, fonts to be loaded, pins used and SPI control method etc
//
// See the User_Setup_Select.h file if you wish to be able to define multiple
// setups and then easily select which setup file is used by the compiler.
//
// If this file is edited correctly then all the library example sketches should
// run without the need to make any more changes for a particular hardware setup!
// Note that some sketches are designed for a particular TFT pixel width/height
@futureshocked
futureshocked / lab_env_db.html
Created April 1, 2020 21:50
The final version of this template file, with support for Arduino remote nodes.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Lab Conditions by RPi</title>
<meta name="description" content="Lab conditions - RPi">
<meta name="author" content="Peter Dalmaris">
<meta http-equiv="refresh" content="600">
@futureshocked
futureshocked / receive_sms.py
Created June 10, 2020 03:54
receive_sms.py
# Written by Billy Hare.
# This script is part of the extension of the Raspberry Pi Full Stack project.
# With this extension, your Raspberry Pu Full Stack application will be capable
# of sending and receiving text messages via the Twilio service.
# More information: https://techexplorations.com/so/rpifs/
from flask import Flask, request
from twilio.twiml.messaging_response import MessagingResponse
@futureshocked
futureshocked / lab_app.py
Created June 10, 2020 03:57
lab_app.py with the Twilio code
'''
FILE NAME
lab_app.py
Version 10
The Twilio code in this script was written by Billy Hare as an extension of the Raspberry Pi Full Stack project.
# With this extension, your Raspberry Pu Full Stack application will be capable
# of sending and receiving text messages via the Twilio service.
# More information: https://techexplorations.com/so/rpifs/
@futureshocked
futureshocked / send_sms.py
Created June 10, 2020 03:59
send_sms.py from Raspberry Pi Full Stack
# Written by Billy Hare.
# This script is part of the extension of the Raspberry Pi Full Stack project.
# With this extension, your Raspberry Pu Full Stack application will be capable
# of sending and receiving text messages via the Twilio service.
# More information: https://techexplorations.com/so/rpifs/
import os
from twilio.rest import Client
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
@futureshocked
futureshocked / env_log.py
Created June 10, 2020 04:00
env_log.py with the Twilio code
#!/usr/bin/env python
'''
FILE NAME
env_log.py
# The Twilio code in this script was written by Billy Hare as an extension of the Raspberry Pi Full Stack project.
# With this extension, your Raspberry Pu Full Stack application will be capable
# of sending and receiving text messages via the Twilio service.
@futureshocked
futureshocked / rf24_receiver.py
Created June 10, 2020 04:02
rf24_receiver.py with the Twilio code
#!/usr/bin/env python
# The Twilio code in this script was written by Billy Hare as an extension of the Raspberry Pi Full Stack project.
# With this extension, your Raspberry Pu Full Stack application will be capable
# of sending and receiving text messages via the Twilio service.
# More information: https://techexplorations.com/so/rpifs/
#
# Simplest possible example of using RF24Network,
#
# RECEIVER NODE
# Listens for messages from the transmitter and prints them out.
@futureshocked
futureshocked / rf24_receiver.service
Created June 10, 2020 04:05
rf24_receiver.service with Twilio code
# Start the rf24 listener script as a service at startup
# Copy this file into /etc/systemd/system as root, for example:
# sudo cp myscript.service /etc/systemd/system/rf24_receiver.service
# Once this has been copied, you can attempt to start the service using the following command:
# sudo systemctl start rf24_receiver.service
# Stop it using following command:
# sudo systemctl stop rf24_receiver.service
# When you are happy that this starts and stops your app, you can have it start automatically on reboot by using this command:
# sudo systemctl enable rf24_receiver.service
#
@futureshocked
futureshocked / EEPROM-Reader.ino
Last active July 18, 2021 23:22
This sketch will read the long in EEPROM address 0.
// This sketch will read the long in EEPROM address 0.
// Written by Peter Dalmaris from Tech Explorations.
// Used to find out how long an ESP32 can last on a LiPo battery.
// https://techexplorations.com
#include "EEPROM.h"
int addr = 0;
#define EEPROM_SIZE 32