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
def split_leftlist(list): | |
half = len(list) / 2 | |
return list[:half] | |
def split_rightlist(list): | |
half = len(list) / 2 | |
return list[half:] | |
def merge(left_list, right_list): |
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 <EEPROM.h> | |
#include <NewSoftSerial.h> | |
NewSoftSerial mySerial(2,3); | |
String readString = ""; | |
String holdString = ""; | |
String id_of_sensor = String(0); |
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 <EEPROM.h> | |
#include <NewSoftSerial.h> | |
NewSoftSerial mySerial(2,3); | |
String readString = ""; | |
String holdString = ""; | |
String id_of_sensor = "0"; |
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
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(6, INPUT); | |
} |
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
int piezoPin = 0; | |
int piezoThreshold = 40; | |
int piezoVal = 0; | |
int array_of_dip[10]; | |
int id_of_sensor = 1; | |
void serial_print() | |
{ | |
Serial.print("<"); | |
Serial.print(id_of_sensor); |