PS2 Controller Sketch for ESCs and Stuff Le Wed 22 October 2014 The ideal controller for this ROV is a wired Playstation 2 controller. Luckily they are still made and there is a library for the Arduino to talk to them. It is also possible to buy sockets for the Playstation 2 controller to plug into without having to make any modifications to the controller. This sketch is a development to test the use of the wired Playstation 2 controller for driving a series of servos and LEDs. The Servos are stand-ins for the ESCs that would be used in reality. The LEDs are used to simulate camera triggers and status as well as pretend to be the main lights. A more detailed article on using Playstation2 Controllers for Arduino projects is available on the " Using A Playstation 2 Controller with your Arduino Project " page. The sketch has been set up for easy splitting into the two sections; one for the Top-Side master Arduino and one for the ROV Slave Arduino with a ...
How To Make Arduino Based Home Automation Project via Bluetooth? 1.Hardware (Input, Output) Arduino UNO: The 8 – bit ATmega 328P microcontroller based Arduino UNO is used in the project to control different components like Bluetooth module and relay network. Bluetooth Module: The Bluetooth Module used in this project is HC- 05. As seen in the image below, this Bluetooth module has 4 – pins for VCC (5V), ground, TX and RX. 2.Software #include <SoftwareSerial.h> const int rxPin = 4; const int txPin = 2; SoftwareSerial mySerial(rxPin, txPin); const int Loads[] = {9, 10, 11, 12}; int state = 0; int flag = 0; void setup() { for (int i=0;i<4;i++) { pinMode(Loads[i], OUTPUT); } ...
ความคิดเห็น
แสดงความคิดเห็น