Skip to content
Permalink
Browse files

Fix spelling mistakes

  • Loading branch information...
mfalkvidd committed Apr 2, 2018
1 parent a7560b3 commit 6e7ee6ab30d503a6f288553689fdfbe645c931e6
@@ -637,7 +637,7 @@ extern "C" {
(NRF_RADIO->STATE == RADIO_STATE_STATE_RxDisable) or
(NRF_RADIO->STATE == RADIO_STATE_STATE_TxRu)) {
if (NRF_RADIO->CRCSTATUS) {
// Ensure no ACK package is recieved
// Ensure no ACK package is received
if (NRF_RADIO->RXMATCH != NRF5_ESB_TX_ADDR) {
// calculate a package id
uint32_t pkgid = rx_buffer.pid << 16 | NRF_RADIO->RXCRC;
@@ -53,10 +53,10 @@
//which is derived from the chart in datasheet
/***********************Software Related Macros************************************/
#define CALIBARAION_SAMPLE_TIMES (50) //define how many samples you are going to take in the calibration phase
#define CALIBRATION_SAMPLE_INTERVAL (500) //define the time interal(in milisecond) between each samples in the
//cablibration phase
#define CALIBRATION_SAMPLE_INTERVAL (500) //define the time interval(in milliseconds) between each samples in the
//calibration phase
#define READ_SAMPLE_INTERVAL (50) //define how many samples you are going to take in normal operation
#define READ_SAMPLE_TIMES (5) //define the time interal(in milisecond) between each samples in
#define READ_SAMPLE_TIMES (5) //define the time interval(in milliseconds) between each samples in
//normal operation
/**********************Application Related Macros**********************************/
#define GAS_LPG (0)
@@ -165,8 +165,8 @@ float MQCalibration(int mq_pin)
/***************************** MQRead *********************************************
Input: mq_pin - analog channel
Output: Rs of the sensor
Remarks: This function use MQResistanceCalculation to caculate the sensor resistenc (Rs).
The Rs changes as the sensor is in the different consentration of the target
Remarks: This function use MQResistanceCalculation to calculate the sensor resistance (Rs).
The Rs changes as the sensor is in the different concentration of the target
gas. The sample times and the time interval between samples could be configured
by changing the definition of the macros.
************************************************************************************/
@@ -23,7 +23,7 @@
* Interrupt driven binary switch example with dual interrupts
* Author: Patrick 'Anticimex' Fallberg
* Connect one button or door/window reed switch between
* digitial I/O pin 3 (BUTTON_PIN below) and GND and the other
* digital I/O pin 3 (BUTTON_PIN below) and GND and the other
* one in similar fashion on digital I/O pin 2.
* This example is designed to fit Arduino Nano/Pro Mini
*
@@ -28,7 +28,7 @@
* Pad 6: PWM output ==> pin 6
*
* From: http://davidegironi.blogspot.fr/2014/01/co2-meter-using-ndir-infrared-mh-z14.html
* MH-Z14 has a PWM output, with a sensitivity range of 0ppm to 2000ppm CO2, an accurancy of ±200ppm.
* MH-Z14 has a PWM output, with a sensitivity range of 0ppm to 2000ppm CO2, an accuracy of ±200ppm.
* The cycle is 1004ms±5%, given the duty cicle Th (pulse high), Tl is 1004-Th, we can convert it to CO2 value using the formula:
* CO2ppm = 2000 * (Th - 2ms) /(Th + Tl - 4ms)
* From: http://airqualityegg.wikispaces.com/Sensor+Tests
@@ -62,7 +62,7 @@ MyMessage lightMsg(0, V_LIGHT);
*/
void setup()
{
// Pull the gateway's current dim level - restore light level upon sendor node power-up
// Pull the gateway's current dim level - restore light level upon node power-up
request( 0, V_DIMMER );
}

@@ -48,7 +48,7 @@
#define LIGHT_OFF 0
#define LIGHT_ON 1

#define SN "Dimable Light"
#define SN "Dimmable Light"
#define SV "1.0"

int16_t LastLightState=LIGHT_OFF;
@@ -70,7 +70,7 @@ void setup()
}
}

//Here you actualy switch on/off the light with the last known dim level
//Here you actually switch on/off the light with the last known dim level
SetCurrentState2Hardware();

Serial.println( "Node ready to receive messages..." );
@@ -83,7 +83,7 @@ void loop()
// recover voltage
calcVoltage = voMeasured * (5.0 / 1024.0);

// linear eqaution taken from http://www.howmuchsnow.com/arduino/airquality/
// linear equation taken from http://www.howmuchsnow.com/arduino/airquality/
// Chris Nafis (c) 2012
dustDensity = (0.17 * calcVoltage - 0.1)*1000;

@@ -46,13 +46,13 @@
#include <MySensors.h>

#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!)
#define PULSE_FACTOR 1000 // Nummber of blinks per KWH of your meeter
#define PULSE_FACTOR 1000 // Number of blinks per KWH of your meeter
#define SLEEP_MODE false // Watt-value can only be reported when sleep mode is false.
#define MAX_WATT 10000 // Max watt value to report. This filetrs outliers.
#define MAX_WATT 10000 // Max watt value to report. This filters outliers.
#define CHILD_ID 1 // Id of the sensor child

uint32_t SEND_FREQUENCY =
20000; // Minimum time between send (in milliseconds). We don't wnat to spam the gateway.
20000; // Minimum time between send (in milliseconds). We don't want to spam the gateway.
double ppwh = ((double)PULSE_FACTOR)/1000; // Pulses per watt hour
bool pcReceived = false;
volatile uint32_t pulseCount = 0;
@@ -97,8 +97,8 @@ void loop()
if (pcReceived && (SLEEP_MODE || sendTime)) {
// New watt value has been calculated
if (!SLEEP_MODE && watt != oldWatt) {
// Check that we dont get unresonable large watt value.
// could hapen when long wraps or false interrupt triggered
// Check that we don't get unreasonable large watt value.
// could happen when long wraps or false interrupt triggered
if (watt<((uint32_t)MAX_WATT)) {
send(wattMsg.set(watt)); // Send watt value to gw
}
@@ -151,4 +151,4 @@ void onPulse()
lastBlink = newBlink;
}
pulseCount++;
}
}
@@ -34,7 +34,7 @@
*
* LED purposes:
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch, only the LEDs that is defined is used.
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation received
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
@@ -27,7 +27,7 @@
*
* LED purposes:
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation received
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
@@ -35,7 +35,7 @@
*
* LED purposes:
* - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation received
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
@@ -20,7 +20,7 @@
*
* DESCRIPTION
* The ArduinoGateway prints data received from sensors on the serial link.
* The gateway accepts input on seral which will be sent out on radio network.
* The gateway accepts input on serial which will be sent out on radio network.
*
* The GW code is designed for Arduino Nano 328p / 16MHz
*
@@ -30,9 +30,9 @@
*
* LEDs (OPTIONAL):
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
*/

@@ -53,7 +53,7 @@
// Enable serial gateway
#define MY_GATEWAY_SERIAL

// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
// Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
@@ -28,9 +28,9 @@
* - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
*
* LEDs (OPTIONAL):
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* If your Arduino board has additional serial ports
* you can use to connect the RS485 module.
@@ -33,9 +33,9 @@
*
* LED purposes:
* - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
*
@@ -96,7 +96,7 @@

// The MAC address can be anything you want but should be unique on your network.
// Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
// Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address.
// Note that most of the Arduino examples use "DEAD BEEF FEED" for the MAC address.
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED

// Enable inclusion mode
@@ -27,9 +27,9 @@
*
* LED purposes:
* - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* See http://www.mysensors.org/build/esp8266_gateway for wiring instructions.
* nRF24L01+ ESP8266
@@ -22,7 +22,7 @@
* Version 1.0 - Henrik EKblad
*
* DESCRIPTION
* Example sketch showing how to measue light level using a LM393 photo-resistor
* Example sketch showing how to measure light level using a LM393 photo-resistor
* http://www.mysensors.org/build/light
*/

@@ -20,7 +20,7 @@
*
* DESCRIPTION
* The ArduinoGateway prints data received from sensors on the serial link.
* The gateway accepts input on seral which will be sent out on radio network.
* The gateway accepts input on serial which will be sent out on radio network.
*
* The GW code is designed for Arduino Nano 328p / 16MHz
*
@@ -30,9 +30,9 @@
*
* LEDs (OPTIONAL):
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* OTA DEBUG MESSAGES
* - Add the OTADebugReceive(message) into receive(const MyMessage &message) on a serial connected node
@@ -59,7 +59,7 @@
// Enable serial gateway
#define MY_GATEWAY_SERIAL

// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
// Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
@@ -45,7 +45,7 @@
// will make the sketch too large for a pro mini's memory so it's probably best to try
// one at a time.

#define ID_S_ARMED 0 // dummy to controll armed stated for several sensors
#define ID_S_ARMED 0 // dummy to control armed stated for several sensors
#define ID_S_DOOR 1
//#define ID_S_MOTION 2
//#define ID_S_SMOKE 3
@@ -91,7 +91,7 @@ bool metric = true;
long randNumber;


//Instanciate Messages objects
//Instantiate Messages objects

#ifdef ID_S_ARMED
bool isArmed;
@@ -857,7 +857,7 @@ void temp()
void hum()
{

Serial.print("Humitidty is: " );
Serial.print("Humidity is: " );
Serial.println(randNumber);

send(msg_S_HUM.set(randNumber));
@@ -873,7 +873,7 @@ void baro()
long pressure = map(randNumber,1,100,870,1086);// hPa?
int forecast = map(randNumber,1,100,0,5);

Serial.print("Atmosferic Pressure is: " );
Serial.print("Atmospheric Pressure is: " );
Serial.println(pressure);
send(msg_S_BARO_P.set(pressure));

@@ -907,7 +907,7 @@ void wind()
void rain()
{

Serial.print("Rain ammount is: " );
Serial.print("Rain amount is: " );
Serial.println(randNumber);

send(msg_S_RAIN_A.set(randNumber));
@@ -1488,7 +1488,7 @@ void receive(const MyMessage &message)
#endif

default:
Serial.print("Unknown/UnImplemented message type: ");
Serial.print("Unknown/Unimplemented message type: ");
Serial.println(message.type);
}

@@ -1,7 +1,7 @@
/***
* This is a simple sketch used to demenstrate and test node-to-node MySensor's communication.
* This is a simple sketch used to demonstrate and test node-to-node MySensors communication.
* To use this sketch, assemble MySensors nodes - they need nothing more than a radio
* 1. Flash each node with the same sketch, open the console and type either 0 or 1 to the respective nodes to set thei ID
* 1. Flash each node with the same sketch, open the console and type either 0 or 1 to the respective nodes to set their ID
* 2. You only need to set the node id once, and restart the nodes
* 3. To being a ping-pong test, simply type T in the console for one of the nodes.
*
@@ -47,7 +47,7 @@ void loop()

// Interactive command and control
// Entering a number from 0 or 1 will write the node 200 (YING) or 201 (YANG) to EEPROM
// Entering T on either node will initiatve a ping-pong test.
// Entering T on either node will initiate a ping-pong test.
if (Serial.available()) {
byte inChar = Serial.read();
uint8_t node = getNodeId();
@@ -22,7 +22,7 @@
* Version 1.0 - Henrik Ekblad
*
* DESCRIPTION
* Example sketch showing how to create a node thay repeates messages
* Example sketch showing how to create a node that repeats messages
* from nodes far from gateway back to gateway.
* It is important that nodes that has enabled repeater mode calls
* process() frequently. Repeaters should never sleep.
@@ -139,7 +139,7 @@ void loop()
digitalWrite(ledPin, HIGH); // Turn on the red light too so the user knows we're programming.
chirp(500, 1500); // And play a tone in case the user can't see the LED.
chirp(500, 1000);
} else { // If we are in programing mode, turn it off.
} else { // If we are in programming mode, turn it off.
programModeActive = false;
digitalWrite(ledPin, LOW);
chirp(500, 1000); // Turn off the programming LED and play a sad note.
@@ -20,7 +20,7 @@
*
* DESCRIPTION
* The ArduinoGateway prints data received from sensors on the serial link.
* The gateway accepts input on seral which will be sent out on radio network.
* The gateway accepts input on serial which will be sent out on radio network.
*
* This GW code is designed for Sensebender GateWay / (Arduino Zero variant)
*
@@ -29,9 +29,9 @@
*
* LEDs on board (default assignments):
* - Orange: USB RX/TX - Blink when receiving / transmitting on USB CDC device
* - Yellow: RX - Blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - Yellow: RX - Blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - Green : TX - Blink fast on radio message transmitted. In inclusion mode will blink slowly
* - Red : ERR - Fast blink on error during transmission error or recieve crc error
* - Red : ERR - Fast blink on error during transmission error or receive crc error
* - Blue : free - (use with LED_BLUE macro)
*
*/
@@ -53,7 +53,7 @@
// Enable serial gateway
#define MY_GATEWAY_SERIAL

// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
// Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & Sensebender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
@@ -135,7 +135,7 @@ void preHwInit()
digitalWrite(LED_BLUE, LOW);
if (Serial) {
Serial.println("Sensebender GateWay test routine");
Serial.print("Mysensors core version : ");
Serial.print("MySensors core version : ");
Serial.println(MYSENSORS_LIBRARY_VERSION);
Serial.print("GateWay sketch version : ");
Serial.println(SKETCH_VERSION);
Oops, something went wrong.

0 comments on commit 6e7ee6a

Please sign in to comment.
You can’t perform that action at this time.