This file contains 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
/********************************************************** | |
* Arduino to Arduino Pin Status | |
* Demonstration sketch | |
***********************************************************/ | |
// ============================================================= | |
// comment out the following line to build the receiver version | |
// of this sketch. | |
// ============================================================= | |
#define SENDER |
This file contains 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
#define SMOKE_PIN A0 | |
#define MIN_TIME 1000 | |
#define MAX_TIME 5000 | |
bool isSmoking = false; | |
int timerDuration = 0; | |
unsigned long startTime; | |
void setup() { | |
// configure the output pin to control the smoke generator |
This file contains 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
#define SMOKE_PIN A0 | |
#define MIN_TIME 1000 | |
#define MAX_TIME 5000 | |
bool isSmoking = false; | |
int timerDuration = 0; | |
unsigned long startTime; | |
void setup() { | |
// configure the output pin to control the smoke generator |
This file contains 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
#define SMOKE_PIN A0 | |
#define MIN_SMOKE_TIME 1000 | |
#define MAX_SMOKE_TIME 5000 | |
void setup() { | |
// configure the output pin to control the smoke generator | |
pinMode(SMOKE_PIN, OUTPUT); | |
// Enable the Arduino device's onboard LED | |
pinMode(LED_BUILTIN, OUTPUT); | |
} |
This file contains 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 DFRobot_mmWave_Radar.ino | |
@ Read whether there is people or object moving in the detection range of the sensor. | |
@ The sensor detection range and output delay time can be configured. Also you can restore the sensor to factory default settings. | |
@n Experimental phenomenon: When the sensor starts successfully, 0 or 1 will be printed on the serial monitor. | |
@ 0 means that there is no human or object moving in sensing area, 1 means the oppposite. | |
@copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) | |
@licence The MIT License (MIT) | |
@version V1.0 | |
@date 2023-3-13 |
This file contains 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
// Adafruit Sample Sketch modified to not use Interrupts | |
// Documented here: https://randomerrors.dev/posts/2023/esp32-and-the-adafruit-music-maker-featherwing/ | |
// Specifically for use with the Adafruit Feather, the pins are pre-set here! | |
// include SPI, MP3 and SD libraries | |
#include <SPI.h> | |
#include <SD.h> | |
#include <Adafruit_VS1053.h> |
This file contains 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
ECHO OFF | |
REM set UPLOAD_PORT=COM6 | |
REM Do we have the `VCToolsVersion` environment variable? | |
IF "%VCToolsVersion%"=="" ( | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" | |
pushd %IDF_PATH% | |
call %IDF_TOOLS_PATH%\idf_cmd_init.bat C:\Python39\ "C:\Program Files\Git\cmd\" | |
popd | |
) ELSE ( | |
echo: |
This file contains 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
# Advent Scheduler | |
# By John M. Wargo | |
# Based on initial work by Jannis Jaeger | |
import random | |
# Constants | |
ADVENT_DAYS = 25 | |
# NAMES = ["Anna", "John", "Elizabeth", "August", "Jannis"] | |
NAMES = ["Anna", "John", "Elizabeth", "August"] |
This file contains 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 | |
in_str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ' | |
out_str = 'jklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghi' | |
def encrypt1(the_string): | |
the_result = '' | |
for x in the_string: | |
pos = in_str.find(x) | |
the_result += out_str[pos] |
This file contains 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/python | |
# A simple Python application for controlling a relay board from a Raspberry Pi | |
# The application uses the GPIO Zero library (https://gpiozero.readthedocs.io/en/stable/) | |
# The relay is connected to one of the Pi's GPIO ports, then is defined as an Output device | |
# in GPIO Zero: https://gpiozero.readthedocs.io/en/stable/api_output.html#outputdevice | |
import sys | |
import time |
NewerOlder