Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#########################################################
# Display the status of the Babel mesh.
# Latest version:
# http://redmine.bidon.ca/projects/reseaulibre-scripts/repository/raw/babelstatus.sh
#
# Usage:
# babelstatus.sh : shows babel routes
# babelstatus.sh --full : show other relevant info
#include "mbed.h"
#include "wire.h"
/*
*/
//P0_18 TX -- I have borken pin so Im using RX for TX
//P0_17 RX
/* BLE bracelet hack
* http://forum.espruino.com/conversations/280747/
*
*/
//P0_18 TX -- I have borken pin so Im using RX for TX
//P0_17 RX
//accelerometer
// http://kionixfs.kionix.com/cn/datasheet/KX022-1020%20Specifications%20Rev4.0%20cn.pdf
#include "SFE_MicroOLED.h"
#define VIBRATE 7
#define BUTTON 4
Timer t;
boolean useAlarm = true;
int alarmHours = 7;
int alarmMinutes = 0;
#!/bin/sh
cat < /dev/ttyACM0 > /tmp/data.log &
while :
do
STR=$(tail -n 2 /tmp/data.log | awk NF)
curl --data "origin=LoGoMo&data=$STR" http://ukhas.net/api/upload
echo "Uploaded: $STR to ukhasnet, go to sleep for 1 min"
sleep 1m
done
#!/bin/sh
#removing empty lines if any and save to data2.log
awk 'NF > 0' /tmp/data.log > /tmp/data2.log
#open data2.log
file="/tmp/data2.log"
#go thru file line by line
while IFS= read -r line
do
#if $line starts with 5 and it is noot the same as previews one (need a bit tweek here)
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include <U8x8lib.h>
#define BUILTIN_LED 25
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 60 /* Time ESP32 will go to sleep (in seconds) */
RTC_DATA_ATTR int bootCount = 0;
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <WebServer.h>
#include <WiFiClient.h>
#include <U8x8lib.h>
#include <HX711_ADC.h>
User Weight
User 82
User 81
User 50
User 48
User 150
User 1.87
User 1.87
User 1.87
User 1.87
LoRa
SX Chips from Semtech for different frequencyes
EU uses 868 Band
Air time limits
SX1276
Great in noisy envirement
Gateway SX1301/SX1308 for gateway
8 bands at the same time
better sensitivity
LoRa is IP block that describes modulation LoRa PHY