EZ430-Chronos on node.js
- used by Chronos node-red module
# -*- coding: utf-8-*- | |
import logging | |
import re | |
import paho.mqtt.publish as publish | |
import paho.mqtt.client as mqtt | |
WORDS = ["GARAGE", "OPEN", "CLOSE", "STATUS"] | |
PRIORITY = 4 |
<!-- Swapan Sarkar <[email protected]> --> | |
<script type="text/x-red" data-template-name="chronos"> | |
<div class="form-row"> | |
<label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label> | |
<input type="text" id="node-input-topic" placeholder="Topic"> | |
</div> | |
<br/> | |
<div class="form-row"> | |
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
""" | |
© 2017 [email protected] | |
This program reads the Accelerometer:x,y,z values | |
coming from uBit via BLE and sends it to the network | |
""" | |
import signal | |
import socket | |
import sys | |
import time |
""" | |
© 2017 [email protected] | |
Module rpidriver.py - rpi library to handle dc motor | |
driven rc car using uBit controller | |
The program reads the Accelerometer:x,y,z values | |
coming from uBit via BLE and control motor using it | |
""" | |
import sys | |
import time |
#include <Arduino.h> | |
#include <stdint.h> | |
#include <TFTv2.h> | |
#include <SPI.h> | |
#include <NTPClient.h> | |
// change next line to use with another board/shield | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
const char *ssid = "<SSID>"; |
/** | |
* ESP8266 project template with optional: | |
* - WiFi config portal - auto or manual trigger | |
* - OTA update - Arduino or web server | |
* - Deep sleep | |
* - Process timeout watchdog | |
* | |
* Copyright (c) 2016 Dean Cording <[email protected]> | |
* Modified by Swapan <[email protected]> | |
* |
/* from https://community.blynk.cc/t/just-my-battery-operated-esp8266-enviro-sensor-node-with-ota-update/9375 | |
V11 -> Temp | |
V9 -> Hum | |
V2 -> Pressure | |
V4 -> Lux | |
V8 -> Dew Point | |
V5 -> Temp Min | |
V6 -> Temp Max | |
V7 -> Reset Temp | |
V19 -> Vcc |
#!/usr/bin/env python | |
"""A simple/readable example of driving a Shiftbrite / Octobar / Allegro A6281 | |
via hardware SPI on the Raspberry Pi. | |
You must have /dev/spidev* devices / bcm2708_spi driver for this to work. | |
""" | |
import fcntl, array, RPi.GPIO as GPIO | |