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
| // give a name to the pin to which the LED is connected: | |
| int led = 9; | |
| // the setup routine runs once when you press reset: | |
| void setup() { | |
| // initialize the digital pin as an output. | |
| pinMode(led, OUTPUT); | |
| } | |
| // the loop routine runs over and over again forever: |
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
| #include <SPI.h> | |
| #include "nRF24L01.h" | |
| #include "RF24.h" | |
| class RF24Test: public RF24 | |
| { | |
| public: RF24Test(int a, int b): RF24(a,b) {} | |
| }; | |
| RF24Test radio(9,10); |
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
| /* | |
| * Control an LED using an array, like in example 3, but the | |
| * pattern is configurable. | |
| * | |
| * Create a pattern with LED on and off information in one array, | |
| * and on/off durations in a second array. | |
| * | |
| * | |
| */ |
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
| /* | |
| * An example of how to create an use an array of chars | |
| * We'll declare an array of 5 chars. | |
| * We'll print the contents in the serial monitor. | |
| * | |
| * The table of ASCII character from https://en.wikipedia.org/wiki/ASCII | |
| * is 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
| /* | |
| * An example of how to create an use an array of integers | |
| * We'll declare an array of 5 integers. | |
| * We'll print the contents in the serial monitor. | |
| * We'll do some calculations, store the results, and print the results in the serial monitor. | |
| * | |
| */ | |
| int my_integers[6] = {1, 2, 3, 4, 5} ; // We want this array to contain 5 integers, | |
| // so we'll declare it with size 6. |
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
| /* | |
| * Control an LED using an array. | |
| * | |
| * Create a pattern with LED on and off information in one array, | |
| * and on/off durations in a second array. | |
| * | |
| * | |
| */ | |
| const int ledPin = 7; |
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/ |
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.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.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. |