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 "CytronMotorDriver.h" | |
CytronMD motorLeft(PWM_PWM, 11, 10); | |
CytronMD motorRight(PWM_PWM, 9, 3); | |
#define BT_TX 6 | |
#define BT_RX 7 | |
#include "SoftwareSerial.h" | |
SoftwareSerial BTSerial(BT_TX, BT_RX); // Maker UNO RX, TX | |
#define BUTTON 2 |
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 the libraries we need | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#include <LiquidCrystal_I2C.h> | |
#define ONE_WIRE_BUS 9 | |
float Celsius = 0; | |
float Fahrenheit = 0; | |
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display |
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 <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display | |
#define _5SEN 3 | |
#define _10SEN 4 | |
#define _20SEN 5 | |
#define _50SEN 6 | |
#define PIEZO 8 | |
int count_5SEN = 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
import io | |
import picamera | |
import cv2 | |
import numpy | |
#Create a memory stream so photos doesn't need to be saved in a file | |
stream = io.BytesIO() | |
#Get the picture (low resolution, so it should be quite fast) | |
#Here you can also specify other parameters (e.g.:rotate the image) |
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
/* | |
* This code will play a melody - Suasana Hari Raya https://www.youtube.com/watch?v=NbxbdmntX58 | |
* using Maker Uno. | |
* | |
* Maker Uno: https://www.cytron.io/p-maker-uno | |
* | |
* Created by: | |
* 6 June 2018 Idris Cytron Technologies | |
*/ |
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
#define BLYNK_PRINT Serial | |
#include <WiFi.h> | |
#include <WiFiClient.h> | |
#include <BlynkSimpleEsp32.h> | |
BlynkTimer timer; | |
// You should get Auth Token in the Blynk App. | |
// Go to the Project Settings (nut icon). | |
char auth[] = "YourAuthToken"; |
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
#define BLYNK_PRINT Serial | |
#include <WiFi.h> | |
#include <WiFiClient.h> | |
#include <BlynkSimpleEsp32.h> | |
#include <Adafruit_NeoPixel.h> | |
#include <SPI.h> | |
#define PIN 27 | |
#define NUMPIXELS 30 | |
#define BLYNK_PRINT Serial |
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 <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define LED_RING 5 | |
#define SENSOR 6 | |
#define PIEZO 8 | |
#define NUMPIXELS 12 // NeoPixel ring size |
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 <Servo.h> | |
Servo myservo1; // create servo object to control a servo1 | |
Servo myservo2; // create servo object to control a servo2 | |
const int sensorPin = 3; // the number of the IR sensor pin | |
int sensorState = 0; // variable for reading the IR sensor status | |
void setup() { | |
// initialize the IR sensor pin as an input: | |
pinMode(sensorPin, 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
#include <ESP8266_Lib.h> | |
#include <BlynkSimpleShieldEsp8266.h> | |
// You should get Auth Token in the Blynk App. | |
// Go to the Project Settings (nut icon). | |
char auth[] = "YourAuthToken"; | |
// Your WiFi credentials. | |
// Set password to "" for open networks. | |
char ssid[] = "YourNetworkName"; |