Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Raspberry Pi / i2c on RPi workaround in AGK?

Author
Message
Orochium
11
Years of Service
User Offline
Joined: 21st Dec 2012
Location: Steamboat Springs, CO
Posted: 6th Oct 2016 23:52
Before jumping too far ahead, I recall seeing the note that i2c wasn't natively supported in AppGameKit for Raspberry Pi.

So what I want to know is, if anyone has some code snippits, or ideas, for getting i2c rolling with the existing GPIO command and (maybe?) some clever programming?

I'm working on an OpenICE (In-car Entertainment) project, and want to look at ways to get the TEAC radio receiver and some other devices to talk to the RPi over i2c but am using AGK4RPi and AGKv2 as the codebase.

If there's not a clever work around to use i2c from AppGameKit, I guess I'll have to revisit the idea of using a Pine64 for this project or otherwise, since integration in android seems easier somehow, but not sure yet (and still no Android release for RPi!) -- but figured I'd seek some input first.

Hope someone can help
Dead Teddy Studios, LLC.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Oct 2016 11:05
I've suggested in the past that I2C will make the Pi version of AppGameKit very useful indeed. Here's hoping
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Orochium
11
Years of Service
User Offline
Joined: 21st Dec 2012
Location: Steamboat Springs, CO
Posted: 7th Oct 2016 19:41
It would, for certain, be extremely useful for non-gaming projects, but I wonder if that's the heart and nature of AppGameKit - I just prefer the platform for fast-prototyping and easy GUI/UI construction.

That said, if the OpenToWrite command can reference GPIO Pin 02 and 03, you might be able to establish a software clock on the SCL (GPIO:3) and then parse commands with a subroutine to GPIO:2 (SDA); which opens things up nicely. I guess I'll just keep monkeying around with subroutines or something until I can get some semblance of function. maybe something that would convert 0xNN registers into bit codes and stream that.

The timing is what concerns me, since I don't think the SCL pin would time itself, and I wonder how much that might vary at runtime.

Unless I'm reaaaaaaaaaaally off base, because my programming is super rusty.
Dead Teddy Studios, LLC.

Login to post a reply

Server time is: 2024-04-20 11:17:41
Your offset time is: 2024-04-20 11:17:41