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
/* | |
LoRa Duplex communication | |
Sends a message every half second, and polls continually | |
for new incoming messages. Implements a one-byte addressing scheme, | |
with 0xFF as the broadcast address. | |
Uses readString() from Stream class to read payload. The Stream class' | |
timeout may affect other functuons, like the radio's callback. For an |
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
/* HC-05 Serial pass through | |
The following AT-commands are supported: | |
AT-command Description | |
---------- ---------------------------------- | |
AT+ROLE Output the current role (1=master/0=slave) | |
AT+UART Output UART com settings | |
AT+UART=115200,0,0 Setup comms to be 115200 baud | |
AT+ADDR? Check device address | |
AT+PSWD Check current connection password |
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
signed long int myNum = -1701543; | |
void setup() { | |
Serial.begin(9600); | |
delay(2000); | |
Serial.print(myNum); | |
char buff[14]; | |
int bufferLength = parseNumberToString( buff, myNum ); | |
Serial.print(":"); | |
Serial.println(buff); |
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 mqtt = require('mqtt'); //https://www.npmjs.com/package/mqtt | |
var Topic = '#'; //subscribe to all topics | |
var Broker_URL = 'mqtt://localhost'; | |
var Database_URL = 'localhost'; | |
var options = { | |
clientId: 'MyMQTT'+Math.random()*64545353, | |
port: 1883, | |
username: 'MyUsername', | |
password: 'MyPassword', |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Konkurranse Nespresso</title> | |
<script src="http://code.jquery.com/jquery-1.11.3.min.js" integrity="sha256-7LkWEzqTdpEfELxcZZlS6wAx5Ff13zZ83lYO2/ujj7g=" crossorigin="anonymous"></script> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
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
/* | |
* Simple code snippet for reading Amphenol | |
* Pressure sensors with I2C output such as | |
* the NPA Series of Surface-Mount Pressure | |
* Sensors NPA-700 and NPA-730. | |
* | |
* This basic snippet will likely work for | |
* similar sensors of other brands also. | |
* I used NPA-730B-05WD to test this. It's | |
* not an Arduino Library, but that's also |
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 <SoftwareSerial.h> | |
SoftwareSerial mySerial(8, 9); | |
void setup() | |
{ | |
delay(500); | |
Serial.begin(115200); | |
mySerial.begin(115200); // use this line on a new module using 115200 baud by default | |
//mySerial.begin(19200); // after setting the baud rate to 19200, we use this speed for mySerial | |
pinMode(13, OUTPUT); |
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
#ifndef FLATBUFFERS_BASE_H_ | |
#define FLATBUFFERS_BASE_H_ | |
// clang-format off | |
// If activate should be declared and included first. | |
#if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING) && \ | |
defined(_MSC_VER) && defined(_DEBUG) | |
// The _CRTDBG_MAP_ALLOC inside <crtdbg.h> will replace | |
// calloc/free (etc) to its debug version using #define directives. |
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
// First, wait for the green LED to go solid green | |
// Then, set the pin code using | |
// AT+CPIN=2643 | |
// When the green LED blinks, you can check the name of the operator | |
// AT+CSPN? | |
// The turn on sending plain text messages (ASCII chars only) | |
// AT+CMGF=1 |
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
/* Dot matrix control Scrolling | |
* Tutorial: https://www.electronoobs.com/eng_arduino_tut56.php | |
*/ | |
#include <LedControl.h> //LedControl library: https://www.electronoobs.com/ledcontrol.php | |
const unsigned char scrollText[] PROGMEM ={" Embedded Systems "}; | |
const int numDevices = 1; // number of MAX7219s used in this case 2 | |
const long scrollDelay = 60; // adjust scrolling speed |