Skip to content

Program that initializes a bluetooth server to connect to android, monitors the USB serial port to connect to arduino and keep sending requests to a website to check changing in light status or detect rough movements and send this information to Arduino

Notifications You must be signed in to change notification settings

JoaoFelipe/ArduinoInterface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoInterface

Embedded Computing System project - laptop

Language: jython (http://www.jython.org/)

This program executes 5 different threads in order to establish the communication between the android and the arduino:

  • RoughMovementThread: Keep sending requests to the website to check if the android app detected a rough movement. If rough movement detected, sends to arduino
  • ReallyRoughMovementThread: The same thing, but for really rough movement
  • LightSwitchThread: Keep sending requests to the website to check the light status and when it changes
  • ArduinoListener: Reads the serial data to collect light change status and heart-rate status and sends to website
  • BluetoothWaitThread: Creates a bluetooth server to establish a direct connection between this program and the android device via bluetooth and get the data faster, by not requiring to do requests to the website

Dependencies:

  1. Python:
  2. Java:
    • Bluecove: http://bluecove.org/
      • Java library for Bluetooth
      • Install by creating a .pth file at jython/lib/site-packages and writing the path to bluecove jar file
    • RXTX: http://users.frii.com/jarvi/rxtx/
      • Java library for serial connection (used by PySerial)
      • Install on ubuntu: run sudo apt-get install librxtx-java
      • Create a .pth file at jython/lib/site-packages with the following paths:
        • /usr/share/java/RXTXcomm.jar
        • /usr/share/java/RXTXcomm-2.2pre2.jar

Running:

  • jython main.py

Collaborators:

About

Program that initializes a bluetooth server to connect to android, monitors the USB serial port to connect to arduino and keep sending requests to a website to check changing in light status or detect rough movements and send this information to Arduino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages