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
# -*- coding: utf-8 -*- | |
# Consolidates several data feeds from Thingspeak and SpaceAPI for consumption | |
# in Slack, where users can find out whether they should wear shorts by using | |
# the '/temperature' command. | |
# Outside weather data is from DarkSky. You'll need to get an API key. | |
# This script is run on a cron job every 15 minutes writing out to a static file | |
# available on a web server. | |
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
{ | |
"response_type":"in_channel", | |
"text":"The interior sensors are currently located in the Workshop.", | |
"username":"Environmental Bot", | |
"icon_emoji":":thermometer:", | |
"attachments":[ | |
{ | |
"color":newspace_colour, | |
"mrkdwn_in":[ | |
"text", |
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
/* --------------------------------------------------------------------- | |
* PWM LED Brightness control for ATtiny13. | |
* Datasheet for ATtiny13: http://www.atmel.com/images/doc2535.pdf | |
* | |
* Pin configuration - | |
* PB1/OC0B: LED output (Pin 6) | |
* PB2/ADC1: Potentiometer input (Pin 7) | |
* | |
* ~100 bytes. | |
* |
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
/* Parsing simple USART commands | |
* ----------------------------- | |
* For more information see | |
* http://www.adnbr.co.uk/articles/parsing-simple-usart-commands | |
* | |
* 996 bytes - ATmega168 - 16MHz | |
*/ | |
#define F_CPU 16000000UL | |
#define BAUD 19200 |
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
/* Counting Milliseconds with Timer1 | |
* --------------------------------- | |
* For more information see | |
* http://www.adnbr.co.uk/articles/counting-milliseconds | |
* | |
* 620 bytes - ATmega168 - 16MHz | |
*/ | |
// 16MHz Clock | |
#define F_CPU 16000000UL |
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
/* MAX7219 Interaction Code | |
* --------------------------- | |
* For more information see | |
* http://www.adnbr.co.uk/articles/max7219-and-7-segment-displays | |
* | |
* 668 bytes - ATmega168 - 16MHz | |
*/ | |
// 16MHz clock | |
#define F_CPU 16000000UL |