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
// Get ESP8266 going with Arduino IDE | |
// - https://github.com/esp8266/Arduino#installing-with-boards-manager | |
// Required libraries (sketch -> include library -> manage libraries) | |
// - PubSubClient by Nick ‘O Leary | |
// - DHT sensor library by Adafruit | |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
#include <DHT.h> |
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 <ESP8266WiFi.h> | |
extern "C" { | |
#include "user_interface.h" | |
#include "wpa2_enterprise.h" | |
} | |
// SSID to connect to | |
static const char* ssid = "eduroam"; | |
// Username for authentification |
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
// Date and time functions using a DS3231 RTC connected via I2C and Wire lib | |
#include <Wire.h> | |
#include "RTClib.h" | |
RTC_DS3231 rtc; | |
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; | |
void setup () { |
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
// GetCode.ino | |
// | |
// Basic example for the TOTP library | |
// | |
// This example uses the opensource SwRTC library as a software real-time clock | |
// you can download from https://github.com/leomil72/swRTC | |
// for real implementation it's suggested the use of an hardware RTC | |
#include "sha1.h" | |
#include "TOTP.h" |
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
<?php | |
ini_set('display_errors', 1); | |
require("phpMQTT.php"); | |
$key = "XXXXX"; // The API key | |
$server = "XXXXX"; // change if necessary | |
$port = XXXXX; // change if necessary | |
$username = "XXXXX"; // set your username | |
$password = "XXXXX"; // set your password |
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 bluetooth | |
import threading | |
import requests | |
from time import sleep | |
import RPi.GPIO as GPIO | |
#Set up GPIO | |
GPIO.setmode(GPIO.BCM) |
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
from bluetooth import * | |
import sys | |
import RPi.GPIO as GPIO | |
import time | |
import random | |
#If using python 2 | |
if sys.version < '3': | |
input = raw_input |
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
<?php | |
/** | |
* Processes the message requested | |
* | |
* @param $update | |
*/ | |
function processMessage($update) | |
switch ($update["queryResult"]["action"]) { |
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
<?php | |
/* | |
Plugin Name: Your plugin name goes here. | |
Plugin URI: Your website/blog address goes here. | |
Description: Removes unnecessary clutter from WPHead. | |
Version: 1.0.0 | |
Author: Your name goes here. | |
Author URI: Your website/blog address goes here. | |
*/ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE params SYSTEM "params.dtd"> | |
<params name="Practice"> | |
<section name="Header"> | |
<attstr name="name" val="Practice"/> | |
<attstr name="description" val="Practice"/> | |
<attnum name="priority" val="100"/> | |
<attstr name="menu image" val="data/img/splash-practice.png"/> |
OlderNewer