Bluetooth Module interfacing with Arduino
Bluetooth Module interfacing with Arduino
INTERFACING JOYSTICK WITH ARDUINO UNO A joystick is commonly known as a control column. It is an input device consisting of a stick that acts as the central point on which the mechanism turns and gives the output its angle or direction to the device it is controlling. It also acts as a principal control device in many aircraft, either as a central stick or side-stick. In this tutorial you will get to know the interfacing joystick with Arduino Uno. Joysticks are used to control video games and also used for controlling machines such as cranes, trucks, etc. Interfacing joystick with arduino uno is one of the important part of any such high level project. MAIN FEATURES OF JOYSTICK INTERFACE WORKING OF JOYSTICK The working of the joystick is nothing but it consists of 2 potentiometers which help in measuring the movement of the stick in 2-D. Potentiometers act as variable resistors and also in providing variable voltage, speed, etc depending on the rotation of the device. This principle is based on the conversion of physical movement into a digital signal and this starts working when it is connected to the computer or the device. CONNECTING THE JOYSTICK WITH ARDUINO The Joystick connection to the ARDUINO is discussed in the following steps:As we discussed above, there are 5pins on the Joystick sensor. Finally, the interfacing of Joystick Sensor with ARDUINO is completed and the last step is dumping the code into the ARDUINO board for the functioning of the Joystick sensor and to get the required output.When the power is supplied the functioning of the sensor starts but it is programmed accordingly to expect a result from it as per our convenience. ARDUINO PROGRAM OF JOYSTICK SENSOR FUNCTIONING OF JOYSTICK SENSOR The functioning of the sensor starts after the successful dumping of code into the ARDUINO development board. The final output values will be visible on the Serial Monitor. When the joystick is in the resting position or middle, it should return a value of about 512. The range of values is from 0 to 1023. So as per the movement of the sensor the output will be displayed on the Serial Monitor. APPLICATIONS: CONCLUSION The above-discussed information is all about the interfacing of the Joystick sensor with ARDUINO and its functioning and the output result of the Joystick sensor.This information can be very much helpful in understanding a brief about the joystick sensor with interface with ARDUINO board and very much helpful in dealing with Robotic projects and others by using the Joystick Sensor Read related articles: Interfacing ultrasonic sensor with arduinoTouch sensor interfacing with arduinoarduino.cc tutorials
ARDUINO UNO Arduino Uno is a development board developed by Arduino.cc, an open-source electronics platform mainly based on AVR microcontroller Atmega328.Basically, an Arduino is a microcontroller, for a basic understanding microcontroller is something the controls the data or in very basic language, it can be said that Arduino is a device that gives a required output to us stated that we give the required inputs to it. For instance –1. We need to switch on the fan just by clapping.2. Send a text message at a particular time.3. Closes the tap when the bucket is filled with water. ARDUINO IDE To set the instructions for arduino, we need a software in which we can write the code and upload to the arduino so that the arduino can perform as required. Once the code is uploaded the arduino will function accordingly. To write the program few basics of coding are required.You can download the IDE from here Once the Arduino IDE is downloaded is looks something like this. Mainly code is written in two areas, void setup() and void loop() . Void setup() is the place where declaration are intialized and Void loop() is the are where output action(what arduino should perform) code should be written. SENSORS AND ACTUATORS These are something that provides input information to the Microcontroller (Arduino)For ex: alcohol sensor, touch sensor, vibration sensor, keypad, touch screen. These are the mostly electromechanical components that perform output action, and are controlled by the code ,which was uploaded to the board by the IDE.For ex: Motors, LED lights, display, buzzer. ARDUINO UNO BOARD Arduino UNO ATmega328 It a 8-bit microcontroller chip used in the arduino board. Flashmemory 32K bytes Maximum clock frequency 20MHz EEPROM 1K byte Internal SRAM 2K bytes PWM channels 6 Programmable I/O lines 23 8 bit counter 2 16 bit counters 1 CRYSTAL OSCILLATOR Crystal oscillators are used in arduino because it helps when Arduino is dealing with time issues, for example if we build a project that turns a switch A OFF after 15 minutes ON and turn ON switch B, C & D one after another with a 20 minutes step. We can use Arduino software to program Arduino to do that.The number on the top of Arduino crystal is 16.000H9H this gives us information about the frequency which is 16,000,000 Hertz or 16 Mhz, this small component can make 16 millions cycles per second so using this concept Arduino can calculate time. POWER SOURCE PINS These are on board pins on arduino that are used to give power to the sensors and actuators. And also they have few GND (ground) pins that should be connected to the sensors and actuators to close the circuit. DC POWER JACK This is used to supply power for arduino board using a power jack, and also a voltage regulator that provides a constant voltage (5V) to arduino board SAMPLE CODE