Android -> bluetooth -> arduino -> pic bus

What other beasties do we have out there that we can stick a Bluetooth module on?

Android -> bluetooth -> arduino -> pic bus

Postby merlin2049er » Mon Aug 18, 2014 2:30 pm

Ok, here's a little project I'd like to get off the ground.

I've got an Android app that pairs with a bluetooth device, it send out bluetooth commands (a string of 44 bits followed by a "\n" character.)

Here's the specs regarding the pic data

The buss is a single asynchronous data line.
Data is four 8 bit bytes followed by a check-sum byte (the 4 data bytes added together).

These are:

Left Volume (0 to 61 with 0 = mute)
Right Volume (0 to 61 with 0 = mute)
Source number (1 to 6 )
Bit Flags (see below)
Check-sum (above 4 bytes added together with an 8 bit result - ie no carry, etc)

The Bit Flags byte consists of:
bit 0 = mute (0 = unmuted / 1 = mute)
bit1 = Tape (0 = tape off / 1 = tape on)
bit2 = Phase (0 = phase off / 1 = phase on)
bit3 = used internally on front panel only
bit4 = used internally on front panel only
bit5 = used internally on front panel only
bit 6 = Power ( 0 = power off / 1 = power on ) - for oem customers who use the display button as power
bit7 = used internally on front panel only


A '0' bit consists of:
keeping the data line low for 26 usec
going high for 12 usec
returning low

A '1' bit consists of:
keeping the data line low for 50 usec
going high for 12 usec
returning low


So what I need to do is write a arduino sketch that will read the bluetooth serial port, and then build the command (ie wait until "\n") then output that string to the pic using the timing above.

I believe that's what I need to do.
merlin2049er
 
Posts: 66
Joined: Fri Apr 19, 2013 3:30 pm

Re: Android -> bluetooth -> arduino -> pic bus

Postby merlin2049er » Mon Aug 18, 2014 3:58 pm

I kind of started this on the arduino forum...

http://forum.arduino.cc/index.php?topic=241399.0
merlin2049er
 
Posts: 66
Joined: Fri Apr 19, 2013 3:30 pm


Return to PIC and other uControllers

Who is online

Users browsing this forum: No registered users and 0 guests

cron