Skip to content

Instantly share code, notes, and snippets.

View futureshocked's full-sized avatar

Peter Dalmaris futureshocked

View GitHub Profile
@futureshocked
futureshocked / Arduino-rf24-dht22.ino
Created March 5, 2020 21:08
This sketch allows an Arduino to transmit DHT22 data to the Raspberry Pi * base node, using the nRF24 transceiver.
/* 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.
*
*
@futureshocked
futureshocked / User_setup.h
Created March 2, 2020 04:30
My User_setup.h file when running Joseph's project in Visual Studio Code
// 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
();
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)
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
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);
}
@futureshocked
futureshocked / test-Wi-Fi.ino
Created January 12, 2020 21:21
My test sketch for the ATWINC1500 Wifi breakout for the Arduino Uno.
/*
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
@futureshocked
futureshocked / ATWINC1500_firmwareUpdater.ino
Created January 12, 2020 20:59
ATWINC1500 firmwareUpdater
/*
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,
@futureshocked
futureshocked / CheckWifi101FirmwareVersion.ino
Last active January 12, 2020 20:57
CheckWifi101FirmwareVersion for my ATWINC1500 breakout
/*
* 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.
*/