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
;Allocation info for local variables in function '_delay_ms_old' | |
;------------------------------------------------------------ | |
;ms Allocated to registers r7 | |
;i Allocated to registers r6 | |
;j Allocated to registers r5 | |
;------------------------------------------------------------ | |
; src/blinky.c:26: void _delay_ms_old(unsigned char ms) | |
; ----------------------------------------- | |
; function _delay_ms_old | |
; ----------------------------------------- |
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
// adapted from http://www.dfrobot.com/wiki/index.php?title=GPS_Module_With_Enclosure_%28SKU:TEL0094%29 | |
// | |
#include <TinyGPS.h> | |
#include <LiquidCrystal.h> | |
TinyGPS gps; | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); //LCD driver pins | |
int led = 13; | |
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
/*---------------------------------------------------------------------*/ | |
/* --- STC MCU Limited ------------------------------------------------*/ | |
/* --- To be downloaded from the ISP chip (limited STC15 series), for example using the main chip -----------------*/ | |
/* --- Mobile: (86)13922805190 ----------------------------------------*/ | |
/* --- Fax: 86-755-82905966 -------------------------------------------*/ | |
/* --- Tel: 86-755-82948412 -------------------------------------------*/ | |
/* --- Web: www.STCMCU.com --------------------------------------------*/ | |
/* If you want to use this code in the program, in the program, using the information and procedures specified macro crystal technology */ | |
/* If you want to quote this code in the article, please indicate in the article the use of information technology and procedures Wang Jing */ | |
/*---------------------------------------------------------------------*/ |
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 <stc12.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
/* ------------------------------------------------------------------------- */ | |
/* Printing functions */ | |
/* ------------------------------------------------------------------------- */ | |
#include "./soft_serial/serial.h" | |
#define printf printf_small |
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
> dofile("mqtt_client_switch.lua"); | |
...SNIP SNIP... | |
dhcp client start... | |
connecting to wifi... | |
connecting to wifi... | |
connecting to wifi... | |
connecting to wifi... | |
connecting to wifi... | |
connecting to wifi... | |
connecting to wifi... |
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
-- based upon work by rutierut and MikeV | |
-- control gpio pin from mq | |
wifiname = "MYWIFINET" | |
wifipass = "MYWIFIPASS" | |
broker = "BROKERIP" -- IP or hostname of MQTT broker | |
mqttport = 1883 -- MQTT port (default 1883) | |
mqtttopic = "switch1" | |
userID = "" -- username for authentication if required |
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
/* | |
// acurite 5n1 weather station (VN1TXC) | |
// decoding over 433MHz ASK superhet RX module | |
// on ESP8266 SDK | |
// | |
// Jens Jensen, 2015 | |
// | |
// todo: emit wx packets as json | |
// todo: add webserver code | |
*/ |
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
// read TI TMP512/TMP513 over I2C | |
// Jens Jensen AF5MI 2014 | |
#include <Wire.h> | |
// address of device - see datasheet, assumes A0 = SCL. | |
#define ADDR 0x5F | |
// current calibration register, see datasheet for calc | |
// I = (V_shunt * CalReg) / 4096 |
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
#!/usr/bin/python | |
# read TI TMP512/TMP513 over I2C | |
# Jens Jensen AF5MI 2014 | |
import wiringpi2 as wp | |
import time | |
# i2c address of device - see datasheet, assumes A0 = SCL. | |
ADDR = 0x5F |
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
// read TI TMP512/TMP513 over I2C | |
// Jens Jensen AF5MI 2014 | |
#include <wiringPi.h> | |
#include <wiringPiI2C.h> | |
#include <stdio.h> | |
// address of device - see datasheet, assumes A0 = SCL. | |
#define ADDR 0x5F |