The examples files with millis() have been moved to https://github.com/Koepel/Fun_with_millis
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
// BH1750.ino | |
// ---------- | |
// 17 august 2016 | |
// First version by Koepel. Public Domain. | |
// Tested with Arduino Uno and Arduino.cc IDE 1.6.9 | |
// In 2016, there are about 10 to 20 libraries for the BH1750, | |
// but I was not happy with the existing code. | |
// I started from scratch and tried to get the maximum out of the sensor. | |
// | |
// |
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
// Wasted | |
// ------ | |
// Show the percentage of cpu time that is wasted in delay(). | |
// ---------------------------------------------------------- | |
// | |
// 8 nov 2016, by Koepel. | |
// first version. Public Domain. | |
// | |
// 16 nov 2016, by Koepel | |
// Added more comment. Added fixed delay inside yield(). |
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
// ----------------------------------------- | |
// HighWaterMark of the stack | |
// ----------------------------------------- | |
// Calculate the high water mark for a Arduino with AVR microcontroller. | |
// It is the amount of memory that was never used since the Arduino was started. | |
// | |
// The __init() or .init1 up to .init9 was used in the past. | |
// It was used to run assembly code to fill the unused ram with a pattern. | |
// With Arduino 1.8.0 that did no longer 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
// Freezing Sketch | |
// --------------- | |
// | |
// December 2017 | |
// Initial version. | |
// Using Arduino IDE 1.8.5 | |
// For an Arduino Uno, Nano, Pro Mini. | |
// Not fully tested, but I did test it with freezing temperatures. | |
// | |
// |
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
// Test PROGMEM beyond 64k | |
// | |
// This test is with Arduino IDE 1.8.5 and a Arduino Mega 2560. | |
// | |
// 29 december 2017 | |
// | |
// For: http://forum.arduino.cc/index.php?topic=519175 | |
// | |
// 2019: See https://forum.arduino.cc/index.php?topic=622922.0 | |
// for multiple PROGMEM segments. |
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
// Arduino IDE 1.8.5, Arduino Uno. | |
// 2018 | |
// Warning: Just a test, it is still full of bugs. | |
// | |
// No use of tables, everything is calculated again for every number. | |
unsigned long number = 4; // start with 4, it must be even and greater than 2 | |
void setup() | |
{ |
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
// --------------------------------------------- | |
// averageRead.ino | |
// --------------------------------------------- | |
// License: The Unlicense, Public Domain. | |
// Author: Koepel | |
// | |
// Version 1, 2020 jan 12 | |
// First version of how I use the average. | |
// I'm not sure if this is the final version. | |
// --------------------------------------------- |