Hello everyone,
I am working on a project where I would like to control the play function on a Brightsign HD223 through its GPIO port on the back.
The GPIO is a new one and I will be using this adaptor from Phoenix to connect to it.
As the Brightsign seems to only accept 3.3v and the Arduino Mega uses 5v, it seems like I have to use a Level Shifter in between and was thinking about using this one from Sparkfun.
I would be connecting the GND and HV of the level shifter to the GND and 5v of the Mega and then GND and LV of the board to the GPIO port. I was going to then use one pin from the Mega in order to communicate with the Brightsign and send the play command (through acting as a push button)
I would be connecting the GND and HV of the level shifter to the GND and 5v of the Mega
Don't connect the 5V.
I am working on a project where I would like to control the play function on a Brightsign HD223 through its GPIO port on the back. ...... Do I need to add anything else?
No idea because you haven't included a link to what you have to do to the GPIO pins to control the player.
Thanks for the help!
Once the button is pushed, I would like the Brighsign player to accept the input in order to play a video.
The code on the Brightsign is looking like this (at present it will play a random video from a selection of 20 each time the button is pressed):
button.EnableInput(0)
not_currently_playing = true
if debug print "Ready"
Wait_to_play:
Msg = wait(0,p)
if debug print type(msg)
if type(msg) = "roVideoEvent" and msg.GetInt() = 8 then
vplayer.StopClear()
not_currently_playing=true
if debug print "Ready"
else if type(msg) = "roGpioButton" then
if debug print "Button: ";msg.GetInt()
if msg.GetInt() = 0 then
if not_currently_playing then
tmpFile = rnd(20) - 1
if debug print tmpFile; " = ";vlist[tmpFile]
ok = vplayer.PlayFile(vlist[tmpFile])
if ok = 0 then
if debug print "error playing file"
if debug print "Ready"
goto wait_to_play
else
not_currently_playing=false
endif
endif
endif
endif
goto wait_to_play
I asked if I need to connect both 5v and GND to both sides of the Level Shifter that I am using between Arduino and the Brightsign player, after reading the hookup guide from SparkFun
Would setting a pin High be enough in order for the GPIO port on the back of the player to think that it receiving the push of a button?
Many thanks for the help!!!
E
How do you know and what language is this?
Can you change this code?
Would setting a pin High be enough in order for the GPIO port on the back of the player to think that it receiving the push of a button?
I doubt it because that code is looking at a button not the GPIO port. Also as well as looking for high it might equally as well be looking for a connection to ground, a much more likely scenario. And what is to say that the button is a GPIO port?
As the Brightsign seems to only accept 3.3v and the Arduino Mega uses 5v, it seems like I have to use a Level Shifter in between and was thinking about using this one from Sparkfun.
All you need to go from 5V to 3V3 is two resistors, a series resistor of 510R and a pull down of 1K.
Thank you Mike,
I am using the Level Shifter from Sparkfun in the end, but it's good to know how to replace it with those resistors.
Btw, I don't know what language that is, I have found a series of scripts on the resources section of the Brightsign website.
Pretty well documented.
Setting a pin as LOW (on setup I have it as HIGH) through digitalWrite, acts as a button connected to the GPIO of the Brightsign and it manages to trigger the video.
I have modified the script from above, it can be saved as 'autorun.brs', placed on a microSD card inside the player, together with the video I want to play.
So far I am having MaxMSP sending a message to Arduino through Serial in order for Arduino to start playing the video on the Brightsign. At that point Max reads the reading of a series of sensors connected to Arduino.
The only thing is that I don't know how to loop that video, I am going through their documentation and will see if I can ask for help on the Brightsign forum.
Grumpy_Mike:
How do you know and what language is this?
Can you change this code?
I doubt it because that code is looking at a button not the GPIO port. Also as well as looking for high it might equally as well be looking for a connection to ground, a much more likely scenario. And what is to say that the button is a GPIO port?
All you need to go from 5V to 3V3 is two resistors, a series resistor of 510R and a pull down of 1K.
I have the same situation but I need to send signal FROM brightsign gpio TO arduino
Can't find any documentation how the script should look like(