Infos on Gamebuino pins / how I2C works

Modules, cases, buttons...

Infos on Gamebuino pins / how I2C works

Postby lastfuture » Wed Jul 16, 2014 7:45 pm

Hello everybody.

I'm mostly a layman when it comes to coming up with and soldering my own hardware so I was very excited for Gamebuino not only as a hands on open mobile gaming platform but also as an Arduino with a lot of the hard stuff already in place (battery, screen, case). I hope this kind of use of the Gamebuino is not frowned upon.

I love using my Arduino Uno as a means to sense things and turn them into data logs / signals / actions. The Gamebuino will enable me to do all that much more reliably and easily. Yay! I've used the Uno to track my washing machine's washing cycles with the help of a piezo disc and turned them into graphs and later into wash-cycle-has-ended signalling

For the Gamebuino what I'm missing is mainly a detailed description of which processor pins are exposed or exposable where for me to hook up additional inputs and outputs. I really suck at reading schematics for example. I wasn't able to figure out that the speaker is on pin 3 for example until I looked at the library files. Are there any pins exposed that aren't used by the Gamebuino that I can use in raw form or are they all used up by I2C etc? (I've been able to figure out the button pins, speaker pin, backlight LED pins, brightness input and battery input pin by looking at the library.
)

I'd also appreciate a link to a good explanation of how I2C works and how I can make my own I2C modules on a breadboard. Also, can I free up the pins currently in use for the I2C headers and use them as regular i/o? Any pointers to easy to follow articles and tutorials regarding this would be much appreciated.

Hope someone can help me out, I've been experimenting with all the example code every night for an hour since my Gamebuino arrived
-- Peter
lastfuture
 
Posts: 29
Joined: Mon Jul 14, 2014 7:20 pm

Re: Infos on Gamebuino pins / how I2C works

Postby rodot » Wed Jul 16, 2014 8:11 pm

Hey there,

To start, I thinks Sparkfun did a good overall presentation of I2C.
Then, to know more about how to use I2C in the case of Arduino/Gamebuino you might want to take a look at the Wire Library reference and examples (it's the I2C library packed in Arduino). There is also PongMulti in the Gamebuino examples which shows how to make 2 Gamebuino communicate both ways in real time over I2C and detect disconnection on both master and slave.

About the Gamebuino accessible pins, there is the ones from the I2C port, A4 and A5. You can either use them to communicate with several I2C devices (or other Gamebuinos) or as raw pins. But not both at the same time. Note that there is pull-up resistors of 4k7 on these pins, but you can disable them by cutting the jumper (on the back side of the PCB, next to the left I2C port).

You can also access the pins 11, 12 and 13 through the ICSP port (respectively MOSI, MISO and SCK). But be careful, they are used to communicate with the screen and the micro SD card (using SPI).

I hope that helps :)
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Infos on Gamebuino pins / how I2C works

Postby lastfuture » Wed Jul 16, 2014 9:22 pm

Excellent! I'll be reading up on I2C at those links, and thank you for the comprehensive roundup of my options for raw pin usage.
Did I read the Gamebuino schematics right that SPK and OUT carry the same signal? (On the four solder pads next to the speaker)

Also thank you for making this possible. Decent visual feedback for my Arduino projects has always been the hardest part for me, operating with LED blink sequences or a binary display on an LED strip. The Nokia screen with easy to use print functions and the independence of any cord are going to be game changers for my future projects.

Sorry for "mis-using" the Gamebuino in that way, I'm really grateful you've made it easy for me to be a lazy ass :D
lastfuture
 
Posts: 29
Joined: Mon Jul 14, 2014 7:20 pm

Re: Infos on Gamebuino pins / how I2C works

Postby rodot » Wed Jul 16, 2014 9:30 pm

Yep the SPK and OUT are bridged by a little track you can cut if you want to use the sound output in something else that the speaker... in a audio jack for example ;)

You don't "mis-use" you Gamebuino, it's meant for gaming but also to be a portable arduino interface :)
I'll design an expansion module with extra I/O, because I understand it's one of the Gamebuino's limitations.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France


Return to Hardware Development

Who is online

Users browsing this forum: No registered users and 3 guests

cron