This file contains hidden or 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
from jetcam.usb_camera import USBCamera | |
import traitlets | |
import ipywidgets | |
from IPython.display import display | |
from jetcam.utils import bgr8_to_jpeg | |
#TODO change capture_device if incorrect for your system | |
camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0) |
This file contains hidden or 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 "TinyGPS++.h" | |
#include "DHTesp.h" | |
#include "MQ135.h" | |
#define DHTPIN 26 | |
#define DHTTYPE DHT22 | |
#define RXD1 22 | |
#define TXD1 23 | |
#define RXD2 16 | |
#define TXD2 17 |
This file contains hidden or 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 "TinyGPS++.h" | |
#include "DHTesp.h" | |
#include "MQ135.h" | |
#define DHTPIN 26 | |
#define DHTTYPE DHT22 | |
#define RXD1 22 | |
#define TXD1 23 | |
#define RXD2 16 | |
#define TXD2 17 |
This file contains hidden or 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 <BLEDevice.h> | |
#include <BLEServer.h> | |
#include <BLEUtils.h> | |
#include <BLE2902.h> | |
#define MOT_1F 23 | |
#define MOT_1R 22 | |
#define MOT_2F 18 | |
#define MOT_2R 19 | |
#define MOT_KICK 21 |
This file contains hidden or 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 "TinyGPS++.h" | |
TinyGPSPlus gps; | |
#define RXD1 22 | |
#define TXD1 23 | |
#define RXD2 16 | |
#define TXD2 17 | |
HardwareSerial Serial1(1); | |
HardwareSerial Serial2(2); |
This file contains hidden or 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
#define RXD2 16 | |
#define TXD2 17 | |
HardwareSerial Serial2(2); | |
String url = "http://alive-backend.herokuapp.com/records"; //URL for HTTP-POST-REQUEST | |
String payload; | |
String system_id = "1"; | |
void setup() { | |
Serial.begin(9600); |
This file contains hidden or 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
HardwareSerial Serial2(2); | |
#define RXD2 16 | |
#define TXD2 17 | |
void setup(){ | |
Serial.begin(9600); | |
while(!Serial); | |
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); |
This file contains hidden or 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
HardwareSerial Serial2(2); | |
#define RXD2 16 | |
#define TXD2 17 | |
const int UP = 13; | |
const int DOWN = 2; | |
const int LEFT = 15; | |
const int RIGHT = 4; | |
const int KICK = 5; |
This file contains hidden or 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
HardwareSerial Serial2(2); | |
#define RXD2 16 | |
#define TXD2 17 | |
void setup() { | |
// Note the format for setting a serial port is as follows: Serial2.begin(baud-rate, protocol, RX pin, TX pin); | |
Serial.begin(9600); | |
pinMode(2,OUTPUT); | |
digitalWrite(2,HIGH); |
This file contains hidden or 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 Libraries | |
****************************************/ | |
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
/**************************************** | |
* Define Constants |