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
| // 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
| (); | |
| 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
| 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
| // 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 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
| int led = 9; // 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() { | |
| // declare pin 9 to be an output: | |
| pinMode(led, OUTPUT); | |
| } | |
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
| /* | |
| Web client | |
| This sketch connects to a website (http://www.google.com) | |
| using a WiFi shield. | |
| This example is written for a network using WPA encryption. For | |
| WEP or WPA, change the WiFi.begin() call accordingly. | |
| This example is written for a network using WPA encryption. For |
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
| /* | |
| FirmwareUpdate.h - Firmware Updater for WiFi101 / WINC1500. | |
| Copyright (c) 2015 Arduino LLC. All right reserved. | |
| This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) any later version. | |
| This library is distributed in the hope that it will be useful, |
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
| /* | |
| * This example check if the firmware loaded on the WiFi101 | |
| * shield is updated. | |
| * | |
| * Circuit: | |
| * - WiFi101 Shield attached | |
| * | |
| * Created 29 July 2015 by Cristian Maglie | |
| * This code is in the public domain. | |
| */ |