Skip to content

Instantly share code, notes, and snippets.

View Kongduino's full-sized avatar
🏠
Working from home

Kongduino Kongduino

🏠
Working from home
View GitHub Profile
// BW = 6: 62.5 kHz, CR = 1: 4/5, HM = 0
uint8_t reg1 = 0x62;
// SF = 12: 12, CRC = 0
uint8_t reg2 = 0xC0;
// LDRO = 1, AGCAutoOn = 1
uint8_t reg3 = 0x0C;
// PaSelect = 1, MaxPower = 7: 15 dBm, OutputPower = 15: 17 dBm
uint8_t regpaconfig = 0xFF;
#define REG_OCP 0x0B
#define REG_PA_CONFIG 0x09
@Kongduino
Kongduino / add2github.sh
Created January 12, 2021 12:55
A quick hack to do most of the work for me when creating a new project on GitHub
#!/bin/sh
git init
cp ~/Coding/LICENSE ./
MYNAME=`pwd|cut -d "/" -f 6`
echo "Project name is $MYNAME"
echo "# $MYNAME">README.md
git add *.*
git add LICENSE
git commit -m "first commit"
git branch -M main
tupperware - application de chat pour les secrétaires
armware - DropBox, Google Backup, OneDrive etc
arrozware - app de spam mail
confiscatware - ransom hack
purgatware - Windows 10
rôtissware - CPU à 197% Arrêtez de jouer à Doom
excrétware - Toute version de Windows
auditoire - iTunes / Samsung Music etc
illusware - 98% du soft des startups
vexatware - un bug le Vendredi à 17h.
@Kongduino
Kongduino / DecodePacket.js
Created April 4, 2020 11:01
Decoding the RAK811 LoRa packets encoded as HEX.
function hex2txt(packet) {
fields=packet.split("=");
values=fields[1].split(":");
info=values[0].split(",");
console.log(info[2]+" chars received");
console.log("RSSI: "+info[0]);
console.log("SNR: "+info[1]);
text=values[1];
j=text.length;
var res="";
@Kongduino
Kongduino / M5StickC_DeepSleep.ino
Last active July 27, 2019 01:02
Implementation of deep sleep with wakeup button for the M5StickC
#include <esp_sleep.h>
#include <esp_wifi.h>
#include <esp_bt.h>
#include <esp_bt_main.h>
#include <driver/adc.h>
#include <M5StickC.h>
void setup() {
M5.begin();
Serial.begin(115200);
@Kongduino
Kongduino / Colours.h
Last active March 18, 2023 21:23
A much more complete set of colours for the ILI9341 on M5Stack
// Extracted and merged from https://github.com/marekburiak/ILI9341_due
// New color definitions use for all my libraries
// Replace the few colours in Display.h (around line 363) with this
#define TFT_ALICEBLUE 0xF7DF
#define TFT_ANTIQUEWHITE 0xFF5A
#define TFT_AQUA 0x07FF
#define TFT_AQUAMARINE 0x7FFA
#define TFT_AZURE 0xF7FF
#define TFT_BEIGE 0xF7BB
#define TFT_BISQUE 0xFF38

Keybase proof

I hereby claim:

  • I am kongduino on github.
  • I am kongduino (https://keybase.io/kongduino) on keybase.
  • I have a public key ASCvAff97xf_ksQ5luzFApHWcBWjoCGC-6iHzbh49cE01go

To claim this, I am signing this object: