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
/* improved settimeSerial.ino | |
https://github.com/millerlp/OWHL/blob/master/settime_Serial/settime_Serial.ino | |
Use this to get your real time clock date and time values | |
synchronized closely. | |
Copyright Luke Miller 2015 | |
To use this program, upload it to your board, then open the | |
serial monitor at 57600 baud. Make sure the serial monitor | |
is set to send a 'newline' when you hit return (see the | |
menu in the lower right of the Arduino serial monitor window) |
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
/********************************************************* | |
Minimal example for LTR329ALS sensor for LectureFeather | |
*********************************************************/ | |
#include "Adafruit_LTR329_LTR303.h" | |
#include <Adafruit_DotStar.h> | |
Adafruit_LTR329 ltr = Adafruit_LTR329(); | |
// There is only one pixel on the board | |
#define NUMPIXELS 1 |
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 <SPI.h> | |
#include <Wire.h> | |
#include <VS1053.h> | |
#include "SampleMp3.h" | |
// These are the pins used for the breakout example | |
#define BREAKOUT_RESET 9 // VS1053 reset pin (output) | |
#define BREAKOUT_CS 10 // VS1053 chip select pin (output) | |
#define BREAKOUT_DCS 6 // VS1053 Data/command select pin (output) | |
#define CARDCS 4 // Card chip select pin |
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 <WiFi.h> | |
#include <HTTPClient.h> | |
// WiFi network name and password: | |
const char * networkName = "your-ssid"; | |
const char * networkPswd = "your-password"; | |
// Internet address to send POST data to | |
const char * hostDomain = "10.13.37.158"; | |
const int hostPort = 3001; |
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
String getValue(String data, char separator, int index) | |
{ | |
int found = 0; | |
int strIndex[] = { 0, -1 }; | |
int maxIndex = data.length() - 1; | |
for (int i = 0; i <= maxIndex && found <= index; i++) { | |
if (data.charAt(i) == separator || i == maxIndex) { | |
found++; | |
strIndex[0] = strIndex[1] + 1; |
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
<!doctype html> | |
<html lang="en" data-theme="dark"/> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script> | |
<script src="./secret.js" type="text/javascript"></script> | |
<script src="./mqtt.js" type="text/javascript"></script> | |
<title>MQTT Demo</title> | |
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css"> | |
</head> |
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
const myTopic = "users/jensa/led"; | |
const myServer = "mqtt.toytronics.com"; | |
const client = new Paho.MQTT.Client(myServer,8883, "myClientId" + new Date().getTime()); | |
client.onConnectionLost = onConnectionLost; | |
client.onMessageArrived = onMessageArrived; | |
console.log("Start connection!"); | |
var connectOptions = { |
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
int sensorPin = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
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 <Arduino.h> | |
#include <Wire.h> | |
#include <i2cdetect.h> | |
#include <Adafruit_LIS3DH.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_DotStar.h> | |
#include "Adafruit_SHT31.h" | |
#include "Adafruit_LTR329_LTR303.h" | |
// There is only one pixel on the 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
#include <WiFi.h> | |
/* | |
* Basic code for setting a Dweet with a GET request on an ESP32 | |
* | |
* Original by Liz Miller (www.learnrobotics.org) | |
* Updated for ESP32 by https://gist.github.com/jenschr | |
*/ | |
// WiFi parameters | |
const char* ssid = "your-ssid"; // Replace with your ssid |
NewerOlder