This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const byte led_gpio = 32; // the PWM pin the LED is attached to | |
| int brightness = 0; // how bright the LED is | |
| int fadeAmount = 5; // how many points to fade the LED by | |
| void setup() { | |
| ledcAttachPin(led_gpio, 0); // assign a led pins to a channel | |
| // Initialize channels | |
| // channels 0-15, resolution 1-16 bits, freq limits depend on resolution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // the setup function runs once when you press reset or power the board | |
| void setup() { | |
| // initialize digital pin LED_BUILTIN as an output. | |
| pinMode(LED_BUILTIN, OUTPUT); | |
| } | |
| // the loop function runs over and over again forever | |
| void loop() { | |
| digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) | |
| delay(1000); // wait for a second |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const byte led_gpio = 32; | |
| // the setup function runs once when you press reset or power the board | |
| void setup() { | |
| // initialize digital pin LED_BUILTIN as an output. | |
| pinMode(led_gpio, OUTPUT); | |
| } | |
| // the loop function runs over and over again forever | |
| void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (); | |
| Serial.print("Sending:"); | |
| Serial.print(message); | |
| Serial.print(" "); | |
| radio.write( &message, 1 ); | |
| // Now, continue listening | |
| radio.startListening(); | |
| // Wait here until we get a response, or timeout (250ms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 1111 - The Arduino Node Sketch | |
| * From Raspberry Pi Full Stack Raspbian | |
| * https://app.techexplorations.com/courses/raspberry-pi-full-stack-raspbian/ | |
| * | |
| * This sketch allows an Arduino to transmit DHT22 data to the Raspberry Pi | |
| * base node, using the nRF24 transceiver. | |
| * The sketch places the Arduino in low-power mode when it is not doing | |
| * useful work. | |
| * | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| FILE NAME | |
| lab_app.py | |
| Version 11 | |
| 1. WHAT IT DOES | |
| This version adds support for node IDs | |
| 2. REQUIRES | |
| * Any Raspberry Pi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # | |
| # This script updates version 1 with the ability to generate | |
| # IFTTT notifications. | |
| # | |
| # | |
| # | |
| from __future__ import print_function |