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
/* Blinks Send/Receive (Test) | |
* | |
* -------------------------------------------------------------------------------------------------- | |
* IMPORTANT: To use this code in Arduino's IDE, first move the Move38-Blinks folder | |
* into the right directory i.e. <user home directory>/Documents/Arduino/hardware/Move38-Blinks | |
* Then open the Arduino IDE and select Tools > Board > "Move38-Blinks" | |
* Now you should be good to go :) (thanks to the hard work of Josh Levine – josh.com) | |
* -------------------------------------------------------------------------------------------------- | |
* | |
* by Jonathan Bobrow |
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
// Goto bed, will only wake up on button press interrupt (if enabled) or WDT | |
static void deepSleep(void) { | |
set_sleep_mode( SLEEP_MODE_PWR_DOWN ); | |
sleep_enable(); | |
sleep_cpu(); // Good night | |
} | |
// Don't do anything, just the interrupt itself will wake us up |
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
#include <avr/pgmspace.h> | |
const PROGMEM uint8_t breath_data[] = { | |
64, 68, 72, 76, 81, 85, 90, 95, 100, 105, 110, 116, 121, 127, 132, 138, | |
144, 150, 156, 163, 169, 176, 182, 189, 196, 203, 211, 218, 225, 233, 241, 249, | |
255, 249, 241, 233, 225, 218, 211, 203, 196, 189, 182, 176, 169, 163, 156, 150, | |
144, 138, 132, 127, 121, 116, 110, 105, 100, 95, 90, 85, 81, 76, 72, 68 | |
}; | |
#define BREATH_LEN (sizeof( breath_data) / sizeof( *breath_data )) |
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
/* | |
* ATTINY85-LED-Boost.c | |
* Full article at | |
* http://wp.josh.com/2017/03/20/blinking-blue-powering-a-3-7-volt-blue-led-from-a-2-4-volt-coin-cell-with-a-0-02-charge-pump | |
* | |
*/ | |
#include <avr/io.h> | |
#define F_CPU 1000000 // 1MHz, default for 8MHz internal osc and clkdiv8 |
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
#include "Wire.h" | |
#define DS3231_I2C_ADDRESS 0x68 | |
#define DS_REG_CR (0x0e) // Control Reg | |
#define DS_REG_SR (0x0f) // Status Reg | |
// Pins connected to the DS2321 | |
// We want to know these so we can put them HI_Z when not talking to the board to get a real power measurement. | |
#define D_SCLK A5 | |
#define D_SDAT A4 |
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
/* | |
* AutomaTileHAL.h | |
* | |
* Created: 1/6/2016 11:56:26 | |
* Proposed hardware abstraction layer for the tile. | |
* | |
* This layer only handles the bare minimum for interfacing with the hardware, all normal | |
* gam-designer-facing functionality is in a portable library that interacts with this HAL. | |
* | |
* |
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
// Print as a serial bit stream on PB2 - Each bit is 17us, just about 38400 baud - LSB first - for debugging. | |
void sprint( uint8_t x ) { | |
DDRB |= _BV(2); | |
PORTB |= _BV(2); // Idle on serial port | |
_delay_us(22); | |
PORTB &= ~_BV(PORTB2); // start bit |
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
/* | |
* Attiny10 AIRBOAT PWM Motor control code | |
* | |
* Created: 12/2/2016 6:17:47 PM | |
* Author : josh | |
*/ | |
#include <avr/io.h> | |
#include <util/delay.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
root@beaglebone:~# iw list | |
Wiphy phy0 | |
max # scan SSIDs: 4 | |
max scan IEs length: 2257 bytes | |
Retry short limit: 7 | |
Retry long limit: 4 | |
Coverage class: 0 (up to 0m) | |
Device supports RSN-IBSS. | |
Supported Ciphers: | |
* WEP40 (00-0f-ac:1) |
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
// **************** TimerShot for Timer 1B ********************* | |
// More info about this program is here... | |
// http://wp.josh.com/2015/03/05/the-perfect-pulse-some-tricks-for-generating-precise-one-shots-on-avr8/ | |
// Demo of a technique to generate various precise one shot pulses using | |
// timer 1 module on an AVR. This demo code version is writen for an Arduino Uno or Mega2560 for the | |
// the Timer1 moudule, but this technique should would on other 16-bit AVR timers on Mega2560. | |
// Original code by Josh Levine, hack by N2GX 8/30/2016. | |
// Long-pulse working solution for TIMER 1B One-Shot, edited from Josh's Timer2 code and a partial Timer3 solution |