Skip to content

Instantly share code, notes, and snippets.

View thushan's full-sized avatar

Thushan Fernando thushan

View GitHub Profile
@thushan
thushan / home-assistant-m5stack-atomlite-env-ii.yaml
Last active January 31, 2022 21:39
ESPHome configuration for M5Stack's AtomLite + ENV-II *SHT30 / BMP280* Sensor
substitutions:
device_name: atomlite-outdoor-sensor
friendly_name: "Outdoor Sensor"
device_description: "Detects ambient temperature and pressure."
esphome:
name: ${device_name}
comment: ${device_description}
esp32:
@thushan
thushan / _waveshare-ico-10dof-imu-for-raspberrypi-pico.md
Last active January 18, 2024 23:26
WaveShare PICO 10DOF IMU for RaspberryPi Pico CircuitPython Example
@thushan
thushan / riscv-pid-controller.riscv
Created December 18, 2023 10:45
PID Controller for riscv for use in our balance bot
# init
.setpoint .word 100 # Setpoint value
.current .word 0 # Current value
.error .word 0 # Error
.integrel .word 0 # integrel term
.derivative .word 0 # Derivative term
.prev_error .word 0 # Previous error
# PID Constants
.Kp .word 0.5 # Proportional gain
@thushan
thushan / ConvertAzureAppSettingsToLocalSettings
Last active June 27, 2024 04:46
Azure App Settings to local.settings.json converter
<#
Azure App Settings / Environment Variables to local.settings.json Converter
| v1.0.1 |-----------------------------------------------------------------
This script will take an Azure App Settings JSON file and convert it to a
local.settings.json file for use with Azure Functions.
It also moves some of the Azure specific settings to the top of the file.