Skip to content

Instantly share code, notes, and snippets.

View nilsonpessim's full-sized avatar

Nilson Pessim nilsonpessim

View GitHub Profile
#include <DS1307.h>
#include <LiquidCrystal.h>
DS1307 rtc(A4, A5);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
rtc.halt(false);
lcd.begin(16, 2);
#include <Servo.h>
const int botaoDireita = 2;
const int botaoEsquerda = 3;
const int servo = 4;
Servo servoMotor;
int angulo = 180;
void setup() {
pinMode(botaoDireita, INPUT);
#include <DS1307.h>
DS1307 rtc(A4, A5);
void setup()
{
rtc.halt(false);
rtc.setDOW(FRIDAY);
rtc.setTime(20, 37, 0);
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
String command = "";
void setup()
{
Serial.begin(115200);
Serial.println("Digite os Comandos AT");
mySerial.begin(9600);
#include <Ultrasonic.h>
#include <LiquidCrystal.h>
Ultrasonic ultrasonic(6,7);
const int Buzzer = 10;
long microsec = 0;
float distanciaCM = 0;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
#include "Ultrasonic.h"
Ultrasonic ultrasonic(6,7);
const int Buzzer = 11;
long microsec = 0;
float distanciaCM = 0;
void setup() {
Serial.begin(9600);
pinMode(Buzzer,OUTPUT);
void setup()
{
Serial.begin (9600);
}
void loop()
{
int sensorValue = analogRead (A0);
Serial.println (sensorValue, DEC);
delay (1000);
}
void setup()
{
Serial.begin (9600);
pinMode (2, INPUT);
}
void loop()
{
int sensorValue = digitalRead(2);
Serial.println (sensorValue, DEC);
delay (1000);
const int PinoSensor = 0;
const int Buzzer = 6;
int ValorSensor = 0;
void setup(){
pinMode(Buzzer, OUTPUT);
Serial.begin(9600);
}
void loop(){
ValorSensor = analogRead(PinoSensor);
Serial.print("Valor do Sensor = ");
int ledPin = 13;
int Botao = 2;
int EstadoBotao = 0;
void setup(){
pinMode(ledPin, OUTPUT);
pinMode(Botao, INPUT);
}
void loop(){
EstadoBotao = digitalRead(Botao);
if (EstadoBotao == HIGH){