Skip to content

Instantly share code, notes, and snippets.

View futureshocked's full-sized avatar

Peter Dalmaris futureshocked

View GitHub Profile
@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 / 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 / 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_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 / 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 / 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 / rf24_receiver_v2.py
Created March 5, 2020 22:15
This script updates version 1 with the ability to generate # IFTTT notifications
#!/usr/bin/env python
#
# This script updates version 1 with the ability to generate
# IFTTT notifications.
#
#
#
from __future__ import print_function
@futureshocked
futureshocked / lab_app.py
Last active May 13, 2020 04:54
This is version 9.1 of lab_app.py. It adds support for remote Arduino node IDs.
'''
FILE NAME
lab_app.py
Version 11
1. WHAT IT DOES
This version adds support for node IDs
2. REQUIRES
* Any Raspberry Pi
@futureshocked
futureshocked / env_log.py
Created March 5, 2020 21:30
1140 - The Python Raspberry Pi logging script with Google Sheet support
#!/usr/bin/env python
#
# 1140 - The Python Raspberry Pi logging script with Google Sheet support
#
# From Raspberry Pi Full Stack Raspbian
# https://app.techexplorations.com/courses/raspberry-pi-full-stack-raspbian/
#
# This program will send a copy of the sensor data to Google Sheet for logging.
# It will also record the same data in the local database.
#
@futureshocked
futureshocked / rf24_receiver.py
Created March 5, 2020 21:15
1120 - The Python nRF24 receiver sketch
#!/usr/bin/env python
#
# 1120 - The Python nRF24 receiver sketch
#
# From Raspberry Pi Full Stack Raspbian
# https://app.techexplorations.com/courses/raspberry-pi-full-stack-raspbian/
#
# This program will use the nRF24 module to receive data from the remote Arduino node.
#
# RECEIVER NODE