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
package dn; | |
import gnu.io.CommPort; | |
import gnu.io.CommPortIdentifier; | |
import gnu.io.SerialPort; | |
import gnu.io.SerialPortEvent; | |
import gnu.io.SerialPortEventListener; | |
import java.io.IOException; | |
import java.io.InputStream; |
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
/* | |
* Blink with Timer, special blink pattern: 2 short pulses, long pause, repeat. | |
* | |
* (C) 2020 Selim Niklaus | |
* _____ __̣̣___ _____ __̣̣___ | |
* Blink pattern: __| |_____| |____________________| |_____| |___ | |
* |200ms|200ms|200ms| 100ms | | |
* |<--->|<--->|<--->|<------------------>| | |
*/ |
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
#!/bin/bash | |
declare -a usbpath | |
usbpath=($( lsusb | grep STM )) | |
bus=$( echo ${usbpath[1]} ) | |
dev=$( echo ${usbpath[3]} | cut -d ':' -f1 ) | |
#compose similar devpath=/dev/bus/usb/001/015 | |
devpath="/dev/bus/usb/${bus}/${dev}" |
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 <iostream> | |
using namespace std; | |
int main() | |
{ | |
int x = 10; | |
double a = 1.0 * x; | |
double l = 1.0; | |
const double eps = 0.000001; |
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
var bytesToInt = function(bytes) { | |
var i = 0; | |
for (var x = 0; x < bytes.length; x++) { | |
i |= +(bytes[x] << (x * 8)); | |
} | |
return i; | |
}; | |
var unixtime = function(bytes) { | |
if (bytes.length !== unixtime.BYTES) { |
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
//============================================================================ | |
// Name : testLoraKey.cpp | |
// Author : nid | |
//============================================================================ | |
#include <iostream> | |
#include <cstring> | |
#include <stdlib.h> | |
#include <stdio.h> |
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
@startuml | |
Alice -> Bob: test | |
@enduml |
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
// MIT License | |
// https://github.com/gonzalocasas/arduino-uno-dragino-lorawan/blob/master/LICENSE | |
// Based on examples from https://github.com/matthijskooijman/arduino-lmic | |
// Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman | |
// Adaptions: Andreas Spiess | |
#include <lmic.h> |
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
// Feather9x_RX | |
// -*- mode: C++ -*- | |
// Example sketch showing how to create a simple messaging client (receiver) | |
// with the RH_RF95 class. RH_RF95 class does not provide for addressing or | |
// reliability, so you should only use RH_RF95 if you do not need the higher | |
// level messaging abilities. | |
// It is designed to work with the other example Feather9x_TX | |
#include <SPI.h> | |
#include <RH_RF95.h> |
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
// Feather9x_TX | |
// -*- mode: C++ -*- | |
// Example sketch showing how to create a simple messaging client (transmitter) | |
// with the RH_RF95 class. RH_RF95 class does not provide for addressing or | |
// reliability, so you should only use RH_RF95 if you do not need the higher | |
// level messaging abilities. | |
// It is designed to work with the other example Feather9x_RX | |
#include <SPI.h> | |
#include <RH_RF95.h> |
NewerOlder