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
/* | |
* Adjustable PWM for ATtiny85 | |
* by Mark Peter Vargha | |
* varghamarkpeter.hu | |
*/ | |
#ifndef F_CPU | |
#define F_CPU 8000000 | |
#endif |
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
/* | |
* Adjustable LED blinky for ATtiny85 | |
* by Mark Peter Vargha | |
* varghamarkpeter.hu | |
*/ | |
#ifndef F_CPU | |
#define F_CPU 1000000 | |
#endif |
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 vs AVR Libc pin change speed | |
// by Mark Peter Vargha | |
// varghamarkpeter.hu | |
// | |
// AVR pin toggle: 0.44 us | |
// | |
// Arduino Polling: 6-11 us | |
// Arduino Interrupt: 11.7 us | |
// AVR Polling: 0.4 - 0.8 us | |
// AVR Interrupt: 1.4 us |
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
/* | |
* Simple, cooperative timed tasks example in Arduino | |
* by Mark Peter Vargha | |
* varghamarkpeter.hu | |
*/ | |
#define INTERVAL_LED 1000 | |
#define INTERVAL_PRINT 5000 | |
unsigned long ledTimestamp = 0; |
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
/* | |
* Simple, cooperative timed GPIO turn off example in Arduino | |
* by Mark Peter Vargha | |
* varghamarkpeter.hu | |
*/ | |
#define BUTTON_PIN 3 | |
#define SSR_PIN 2 | |
#define POT_PIN A0 |
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
/* | |
* Auto off lamp with manual override. | |
* https://circuits.io/circuits/3546758-auto-off-lamp | |
* Mark Peter Vargha | |
* varghamarkpeter.hu | |
*/ | |
#define LAMP_PIN 9 | |
#define LED_PIN 8 | |
#define BUTTON_PIN 7 |