Skip to content

Instantly share code, notes, and snippets.

View e-Gizmo's full-sized avatar
👩‍🏫
Conducting FREE Seminar and Workshop for Educators https://bit.ly/2XAGOvb

e-Gizmo Mechatronix Central e-Gizmo

👩‍🏫
Conducting FREE Seminar and Workshop for Educators https://bit.ly/2XAGOvb
  • e-Gizmo Mechatronix Central
  • 2/F VSC Building, 2313 Corner Castro St. Taft Ave., Malate, 1004 Manila, Philippines
View GitHub Profile
@e-Gizmo
e-Gizmo / Radar_Processing2.pde
Created October 15, 2018 10:28
Version of the codes that will fit into any resolution of the screen:
/*Radar Project
*
* Updated version. Fits any screen resolution!
* Just change the values in the size() function,
* with your screen resolution.
*
* by Dejan Nedelkovski,
* www.HowToMechatronics.com
*
*/
import processing.serial.*; // imports library for serial communication
import java.awt.event.KeyEvent; // imports library for reading the data from the serial port
import java.io.IOException;
Serial myPort; // defines Object Serial
// defubes variables
String angle="";
String distance="";
String data="";
String noObject;
float pixsDistance;
// Includes the Servo library
#include <Servo.h>
#include <NewPing.h>
int pos = 15;
// Defines Tirg and Echo pins of the Ultrasonic Sensor
const int trigPin = 10;
const int echoPin = 11;
// Variables for the duration and the distance
long duration;
/*
* created by Rui Santos, http://randomnerdtutorials.com
*
* Complete Guide for Ultrasonic Sensor HC-SR04
*
Ultrasonic sensor Pins:
VCC: +5VDC
Trig : Trigger (INPUT) - Pin11
Echo: Echo (OUTPUT) - Pin 12
GND: GND
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
/*
Created by Rui Santos
All the resources for this project:
http://randomnerdtutorials.com/
Based on some Arduino code examples
*/
// include the library code
/*
PowerRelay Module 12VDC sketch
This is a simple sketch for triggering
the contact of relay. Use digital pin 7
for output.
gizDuino LIN-UNO is an
Arduino UNO Board and IDE
compatible.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 4); // RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
/*
Memory Game with Arduino
Based on a project by Jeremy Wilson
Modified by Rui Santos
Visit: http://randomnerdtutorials.com
*/
// Constants
const int button1 = 2; // 1st button controls Blue LED
const int button2 = 3; // 2nd button controls Yellow LED
/*
Motion Detector using PIR Human Motion sensor
This is an example sketch where you will determine if there's
a motion on your surrounding with LED indicator. Motion Detected,
LED is HIGH.
*/
int LED_INDICATOR = 13;
int PIR_SENSOR = 2;