Interfacing Arduino Micro with another digital device


i have arduino micro, , rn-52 bluetooth audio module want control arduino.

the rn-52 3.3v device, , can controlled on uart interface when pin gpio9 pulled low.

it has 'event' signal on gpio2. gpio2 floats high (3.3v) , goes low 100 ms when event happens. @ point i'm supposed enter terminal mode pulling gpio9 low, waiting 'cmd', entering 'q\r', , parsing result. think know how can micro.

with background, best way of working gpio2? should connect digital pin , use isr? or polling of main loop fast enough doing digital read work?

also, since rn-52 3.3v , micro 5v, can use digital inputs @ all, or should reading analog line? think digital state change means 3.0v -> 0, want sure.

thanks in advance or advice.

if you've got 100ms on signal think catch normal polling in loop.  that's pretty long time in microcontroller terms unless have bunch of other code blocking. 

the 3.3v thing tough.  i've used 3.3v spi devices sd card before , used pair of resistors make voltage divider take 5v down 3.3.  it's not perfect, works in hackiest sense of term.  arduino read 3.3v signal high, can pretty rely on arduino being able recieve on normal digital pin. 

if main function of particular arduino, there 3.3v flavors of board.  don't remember ones, else can surely add that.


Arduino Forum > Using Arduino > Programming Questions > Interfacing Arduino Micro with another digital device


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code