140 likes | 163 Views
Learn how to connect Raspberry Pi to a touch screen using a Bluetooth interface, including GUI development and socket programming for seamless communication. Get insights on benefits, hardware setup, and data validation methods.
E N D
Bluetooth Communication using a touch screen interface with Raspberry Pi. • Authors : • Gopinath Shanmuga Sundaram, Bhanuprasad Patibandala, Harish Santhanam, Sindhura Gaddam, Vamsi Krishna Alla, Gautham Ravi Prakash, Shiva Chaitanya Vishwakarma Chandracha, Sindhu Boppana and James M. Conrad. • Electrical and Computer Engineering, • University of North Carolina, Charlotte, NC, USA.
Topics • Raspberry Pi. • Interface with the Touch screen Device. • Interface with the communication hardware. • GUI development. • Socket programming for communications
Raspberry Pi • Raspberry Pi is a credit-card-sized • single-board computer developed in the UK by Raspberry Pi • Foundation. • Technical specifications • Processer -Broadcom BCM2835(SoC),speed up to 1 GHz • RAM- 256 megabytes • VideoCore IV GPU • Storage- SD Card • Operating system – Linux • Power source- 5v via MicroUSB or GPIO header.
Benefits of using the Raspberry Pi • A huge array of Audio and Video outputs which include RCA(NTSC and PAL), HDMI, raw LCD panels via DSI, 3.5 mm Audio jack, I2S Audio. • Huge support from the open source community. Operating systems such as Fedora, Debian and ArchLinuxare officially supported. • Support for various programming languages such as Python, BASIC, C and Perl. • The Raspberry Pi provides a desktop like computing environment at a very cheap price( The entry level model costs 35$).
Carding machine & Auto leveller SYSTEM SETUP.
Interface with the Touch Screen Display. • The display is connected to the Raspberry Pi via HDMI. • The interface is achieved by building on top of the generic device driver. • Calibration of the Touch screen is done using the open source screen calibrator program Xinput-calibrator which provides a temporary configuration for the touch screen. • The configuration is made permanent by writing the achieved values to the device configuration files.
Bluetooth Hardware • A Broadcom 2046 Bluetooth 2.1 dongle was used to provide Bluetooth communications. • pyBlueZ was used to gain access to system resources it is a python extension module written in C • The Bluetooth adapter was bought up and controlled using hcitool
GUI Development • Several options were considered for the GUI development such as • 1. Stand alone application in C. • 2. Stand alone application in python. • 3. GUI in html • HTML was chosen because of its rich graphical capabilities and portability. • JavaScript has been used to implement various dynamic elements of the GUI which interact with the user.
Socket programming at client • Protocol used is radio frequency communication protocol. • RFCOMM is a simple set of communication protocols which provide emulation of RS232 serial ports over the top of L2CAP. • A simple set of data stream is provided to the user similar to TCP. • The MAC address of the server to which the Bluetooth adapter has to be connected is assigned to the variable server_addressand port 1 is selected. • After connecting to the given MAC address via RFCOMM data is sent
Socket programming at Server. • Server also uses the RFCOMM protocol to connect to the client • The socket is put in listen mode and the data sent from the client is stored to be processed later. • The server also acknowledges the receipt of the data from the client.
Data validation and consistancy • Data validation is done by applying cyclic redundancy checks. • CRC is an error detecting code used to detect any accidental changes to data in digital networks and storage devices. • The CRC is calculated at both the server(upon receiving the data) as well as the client side(upon transmission of data). • When the check is passed an acknowledgment is sent to the client.
References • www.raspberrypi.org • www.wikipedia.org