Skip to content

Instantly share code, notes, and snippets.

View TiMladenov's full-sized avatar

Tihomir Mladenov TiMladenov

View GitHub Profile
let userSecret = "your_user_secret";
let clientSecret = "your_client_secret";
let host_url = 'your_host_url';
let scope = 'your_app_scope';
let toEncode = userSecret +":"+ clientSecret;
toEncode = btoa(toEncode);
pm.environment.set("auth_token", toEncode);
pm.environment.set("host_url", host_url);
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
listener 8883 0.0.0.0
################################################################################
# MQTT at mosquitto.org
#
# Created: 2015-10-15 21:37:25.886276
#
################################################################################
import streams
from mqtt import mqtt
from wireless import wifi
import wx
import socket
import feedparser
class NewsRss(wx.Panel):
def __init__(self, parent):
super(NewsRss, self).__init__(parent = parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TAB_TRAVERSAL)
self.rss_urls = []
self.parent = parent
/*
Demonstration sketch for Adafruit i2c/SPI LCD backpack
using MCP23008 I2C expander
( http://www.ladyada.net/products/i2cspilcdbackpack/index.html )
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* 5V to Arduino 5V pin
#include <LiquidCrystal.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // SET I2C Address
void setup() {
lcd.begin(16,2); // Initialinze LCD.
lcd.backlight(); // makes Backligh ON.
lcd.clear(); // Clears LCD
import streams
from mqtt import mqtt
from wireless import wifi
from espressif.esp32net import esp32wifi as wifi_driver
wifi_driver.auto_init()
sleep(1000)
streams.serial()
print("Establishing WiFi Link...")