This file contains hidden or 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 machine | |
from micropython import const | |
import struct | |
from machine import Pin, ADC, WDT | |
import asyncio | |
import aioble | |
import bluetooth | |
import time |
This file contains hidden or 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 <MQTT.h> | |
#include <ArduinoJson.h> | |
#include "arduino_secrets.h" | |
#include <algorithm> | |
WiFiClient net; | |
MQTTClient client; | |
#define PIN_PUMP 12 |
This file contains hidden or 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 "__private_key_material.h" | |
// ISRG Root X2 (ECDSA P-384) | |
const char* ANCHOR_CA = R"EOF( | |
-----BEGIN CERTIFICATE----- | |
MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQsw | |
CQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2gg | |
R3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00 | |
MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVTMSkwJwYDVQQKEyBJbnRlcm5ldCBT |
This file contains hidden or 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
/* | |
This is an amalgamation of 3 examples made by the following people: | |
Author: | |
- Hai Nguyen (Silicon Labs) | |
- Tamas Jozsi (Silicon Labs) | |
- Ciara Jekel (Sparkfun Electronics) | |
*/ | |
#include <Wire.h> | |
#include <Matter.h> |
This file contains hidden or 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 <ArduinoBLE.h> | |
#include <Arduino_HS300x.h> | |
BLEService envSvc("181A"); | |
BLEShortCharacteristic tempChar("2A6E", BLERead | BLENotify); | |
BLEUnsignedShortCharacteristic humChar("2A6F", BLERead | BLENotify); | |
void setup() { | |
Serial.begin(9600); |
This file contains hidden or 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 <TMC2209.h> | |
// This example will not work on Arduino boards without HardwareSerial ports, | |
// such as the Uno, Nano, and Mini. | |
// | |
// See this reference for more details: | |
// https://www.arduino.cc/reference/en/language/functions/communication/serial/ | |
HardwareSerial & serial_stream = Serial2; |
This file contains hidden or 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 picographics import PicoGraphics, DISPLAY_PICO_EXPLORER, PEN_RGB332 | |
from pimoroni_i2c import PimoroniI2C | |
from breakout_bme68x import BreakoutBME68X | |
from pimoroni import Button | |
from time import ticks_ms | |
from math import floor | |
display = PicoGraphics(display=DISPLAY_PICO_EXPLORER, pen_type=PEN_RGB332) | |
black_pen = display.create_pen(0, 0, 0) | |
white_pen = display.create_pen(255, 255, 255) |
This file contains hidden or 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
/* | |
Matter color lightbulb example for the Nano Matter | |
The example shows the basic usage of the Arduino Matter API. | |
The example lets users control the onboard RGB LED on the Nano Matter as a Matter lightbulb. | |
It's possible to switch the LED on/off, adjust the brightness and the color as well. | |
The device has to be commissioned to a Matter hub first. | |
Compatible boards: |
This file contains hidden or 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
/// License: Public Domain, or MIT License where Public Domain is not available | |
import Foundation | |
extension UUID { | |
/// Implementation of UUIDv7 generator based on the specifications in draft-ietf-uuidrev-rfc4122bis-14 | |
/// | |
/// UUIDv7 is generated without using any additional methods of Monotonicity Guarantees. (Section 6.2) As such, the UUID is accurate to the millisecond only. | |
/// | |
// Field and Bit Layout: |
This file contains hidden or 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
#!/bin/bash | |
TOKEN='YOUR_TOKEN_HERE' | |
FINGERPRINT=$(hostname | sha1sum) | |
IMAGE_PATH='/tmp/snapshot.jpg' | |
libcamera-jpeg -n --rotation 180 -o "$IMAGE_PATH" | |
curl -X PUT \ | |
-H "Token: $TOKEN" \ | |
-H "Fingerprint: $FINGERPRINT" \ |
NewerOlder