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 BUTTON 2 | |
#define PIEZO 8 | |
#define L293N_ENA 5 | |
#define L293N_ENB 6 | |
#define L293N_IN1 7 | |
#define L293N_IN2 9 | |
#define L293N_IN3 10 | |
#define L293N_IN4 11 |
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 TRIGPIN 3 | |
#define ECHOPIN 4 | |
#define L298N_ENA 5 | |
#define L298N_ENB 6 | |
#define L298N_IN1 7 | |
#define L298N_IN2 9 | |
#define L298N_IN3 10 | |
#define L298N_IN4 11 |
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 BT_TX 4 | |
#define BT_RX 2 | |
#include "SoftwareSerial.h" | |
SoftwareSerial BTSerial(BT_TX, BT_RX); // Maker UNO RX, TX | |
#include "CytronMotorDriver.h" | |
// Configure the motor driver. | |
CytronMD motor1(PWM_PWM, 3, 9); // PWM 1A = Pin 3, PWM 1B = Pin 9. | |
CytronMD motor2(PWM_PWM, 10, 11); // PWM 2A = Pin 10, PWM 2B = Pin 11. |
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" | |
// Configure the motor driver. | |
CytronMD motor1(PWM_PWM, 3, 9); // PWM 1A = Pin 3, PWM 1B = Pin 9. | |
CytronMD motor2(PWM_PWM, 10, 11); // PWM 2A = Pin 10, PWM 2B = Pin 11. | |
long duration; | |
long distance; | |
#define BUTTON 2 | |
#define PIEZO 8 | |
#define TRIGPIN 5 |
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 <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | |
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) | |
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) |
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
/* | |
-------------------------------------------------------------------------------------------------------------------- | |
Example sketch/program showing how to read data from a PICC to serial. | |
-------------------------------------------------------------------------------------------------------------------- | |
Typical pin layout used: | |
----------------------------------------------------------------------------------------- | |
MFRC522 Arduino Arduino Arduino Arduino Arduino | |
Reader/PCD Uno/101 Mega Nano v3 Leonardo/Micro Pro Micro | |
Signal Pin Pin Pin Pin Pin Pin | |
----------------------------------------------------------------------------------------- |
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
boolean state = false; | |
void setup() { | |
pinMode(3, OUTPUT); //Set pin as an output | |
Serial.begin(9600); //Start serial communication @9600 bps | |
} | |
void loop() { |
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 controlP5.*; //import ControlP5 library | |
import processing.serial.*; | |
Serial port; | |
ControlP5 cp5; //create ControlP5 object | |
void setup(){ //Same as setup in arduino | |
size(300, 300); //Window size, (width, height) |
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> // Include the Servo library | |
int servoPin = 3; | |
const int trigPin = 9; | |
const int echoPin = 10; | |
Servo myServo; // Create a servo object | |
int val = 0; | |
long duration; | |
int distance; | |
void setup() { |
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 processing.serial.*; | |
import controlP5.*; | |
Serial myPort; | |
ControlP5 cp5; | |
ControlGroup messageBox; | |
String data = "0"; | |
void setup() { | |
size(500,430); |
OlderNewer