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
// 1. connect the module to Wi-Fi and MQTT | |
// 2. Install mqttthing add-on into HomeBridge. | |
// 3. Add the following section to mqttthing JSON configuration (inside accessories array) | |
// 4. Change mqtt url, username, password and YOUR_DEVICE_FRIENDLY_NAME to match your setup. | |
{ | |
"accessory": "mqttthing", | |
"type": "custom", | |
"url": "<192.168.1.XXX:1883>", |
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
import digitalio | |
import board | |
import usb_hid | |
import time | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.mouse import Mouse | |
from adafruit_hid.keycode import Keycode | |
from adafruit_hid.consumer_control import ConsumerControl | |
from adafruit_hid.consumer_control_code import ConsumerControlCode |
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
/** | |
* | |
* Raspberry Pi Pico internal temperature sensor with LCD 16x2 example. | |
* | |
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. | |
* | |
* Adapted by MaxMacSTN | |
* | |
* SPDX-License-Identifier: BSD-3-Clause | |
*/ |
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
/* | |
Supported DEVIO NB-DEVKIT I Board | |
| Do not use PIN | | |
| 16 TX | | |
| 17 RX | | |
| 4 EINT | | |
| 26 power key | | |
| 27 reset | | |
This is an example for DEVIO NB-DEVKIT I. That has get swich data from Magellan IoT Platform for control LED on board. |
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
/* | |
* doorBell_test.ino | |
* Copyright (c) 2019 Sitinut Waisara | |
* magiapp.me | github.com/maxmacstn | |
*/ | |
int signalPin = D1; | |
void setup() { | |
Serial.begin(115200); |
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
/* | |
* Copyright (c) 2019 Sitinut Waisara | |
* magiapp.me | github.com/maxmacstn | |
* | |
* For sending notification + IP Cam snapshot image to Line Notify when Doorbell was pressed. | |
* | |
* Hardware : Generic doorbell with active high or you can connect with button + generic Chinese P2P IP Cam | |
* | |
*/ |
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
/** | |
* Distance between two station | |
* | |
* dist(start, stop, minute). | |
*/ | |
% Airport link | |
dist(arl_phaya_thai, arl_ratchaprarop, 60). | |
dist(arl_ratchaprarop, arl_makkasan, 180). |
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
/*** Data from http://m.bts.co.th/mweb1/webpages/fare.aspx ***/ | |
/*** ราคา SJT(Single journey trip) ***/ | |
var N8_SJT_Array= new Array(" --- ค่าบริการ ---| --- ระยะเวลา ---","16","16","23","26","30","33","37","40","44","44","44","44","44","44","44","44","44","44","59","59","59","59","59","59","44","44","44","44","44","44","44","44","44","59","59","59","59"); | |
var N7_SJT_Array= new Array(" --- ค่าบริการ ---| --- ระยะเวลา ---","16","16","16","23","26","30","33","37","40","44","44","44","44","44","44","44","44","44","59","59","59","59","59","59","44","44","44","44","44","44","44","44","44","59","59","59","59"); | |
var N6_SJT_Array= new Array(" --- ค่าบริการ ---| --- ระยะเวลา ---","23","16","16","16","23","26","30","33","37","40","44","44","44","44","44","44","44","44","59","59","59","59","59","59","40","40","44","44","44","44","44","44","44","59","59","59","59"); | |
var N5_SJT_Array= new Array(" --- ค่าบริการ ---| --- ระยะเวลา ---","26","23","16","16","16","23","26","30","33","37","40","44","44","44","44","44","4 |
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 "FastLED.h" | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. | |
// | |
// -Mark Kriegsman, December 2014 |