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
| void refresh_readings() { | |
| float f_temperature; | |
| float f_humidity; | |
| float f_pressure; | |
| float f_altitude; | |
| digitalWrite(LED_PIN, HIGH); | |
| postCounter++; // New post, increase the post counter |
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
| /* 06. Ultrasonic distance sensor HC-SR04 demo sketch | |
| * | |
| * This sketch calculates the distance between the HC-SR04 sensor and | |
| * an object directly infront of it. | |
| * | |
| * To see the trigger and echo waveforms with your oscilloscope, | |
| * connect CHA to the trigger and CHB to the echo pins. | |
| * | |
| * Set up edge trigger to CHA, and set it to 1V (or there about). | |
| * |
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
| /* 07. Arduino PWM oscilloscope demo sketch | |
| * | |
| * Use this sketch to experiment with the measurement of a PWM waveform | |
| * on an oscilloscope. | |
| * | |
| * Connect CHA of the oscilloscope to the anode of the LED. | |
| * | |
| * Use a potentiometer to control the duty cycle. | |
| * | |
| * Set triggering to Auto, and start the experiment. |
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
| /* 08. Arduino servo control oscilloscope demo sketch | |
| * | |
| * Use this sketch to experiment with the measurement of a PWM waveform | |
| * used to control a servo motor on an oscilloscope. | |
| * | |
| * Connect CH1 of the oscilloscope to pin 9 that controls the servo. | |
| * | |
| * Use a potentiometer to control the duty cycle and therefore the position of the | |
| * servo. | |
| * |
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
| // With this program, you can use the ESP32 as an ultra-low cost signal generator. | |
| // To learn more, see https://techexplorations.com/courses/oscilloscopes/ | |
| #include <Arduino.h> | |
| #include "waveforms.h" | |
| int i = 0; | |
| int sample_delay = 0; | |
| const byte POT_GPIO = 35; // Potentiometer | |
| int t_sample; |
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
| /* 11.1. Arduino UART receive integer oscilloscope demo sketch | |
| * | |
| * Use this sketch to experiment with the decoding of a single | |
| * integer in simplex on an oscilloscope. | |
| * | |
| * Connect CH1 of the oscilloscope to pin 0 of the Arduino. | |
| * Connect CH2 of the oscilloscope to pin 1 of the Arduino. | |
| * | |
| * | |
| * This sketch was written for Oscilloscopes for Busy People by Peter Dalmaris. |
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
| /* 11.2. Arduino UART receive/transmit ASCII character and decode with an oscilloscope demo sketch | |
| * | |
| * Use this sketch to experiment with the decoding of an ASCII character | |
| * that is received and transmitted by an Arduino on an oscilloscope. | |
| * | |
| * Use in tandem with the matching Processing sketch | |
| * | |
| * Connect CH1 of the oscilloscope to pin 0 of the Arduino. | |
| * Connect CH2 of the oscilloscope to pin 1 of the Arduino. | |
| * |
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
| /* 11.3. Arduino UART receive/transmit a packet and decode with an oscilloscope demo sketch | |
| * | |
| * Use this sketch to experiment with the decoding of a multi-byte packet | |
| * that is received and transmitted by an Arduino on an oscilloscope. | |
| * | |
| * Use in tandem with the matching Processing sketch | |
| * | |
| * Connect CH1 of the oscilloscope to pin 0 of the Arduino. | |
| * Connect CH2 of the oscilloscope to pin 1 of the Arduino. | |
| * |
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
| /* 11. Arduino with BME280 I2C example sketch | |
| * | |
| * Use this sketch to experiment with the decoding of I2C communication on an oscilloscope. | |
| * | |
| * Connect CH1 of the oscilloscope to SCL. | |
| * Connect CH2 of the oscilloscope to SDA. | |
| * | |
| * | |
| * This sketch was written for Oscilloscopes for Busy People by Peter Dalmaris. | |
| * Find out more at https://techexplorations.com/courses/oscilloscopes/ |