Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate GPIO #3

Open
madc opened this issue Mar 29, 2016 · 6 comments
Open

Simulate GPIO #3

madc opened this issue Mar 29, 2016 · 6 comments

Comments

@madc
Copy link

madc commented Mar 29, 2016

I'm currently developing an application using this addon and it an the RPI it works fine. But as soon, as I add the addon, I can't compile my app on my notebook (Arch) anymore, which makes sense, as it has no GPIO pins..

I didn't dig to deep into your code yet, but would it make sense to simulate the pins, if not available?
I was thinking similar to this solution for the python implementation.

Not sure, if it really makes sense, just throwing the idea out there.

@kashimAstro
Copy link
Owner

HI @madc

This addons can be compiled under the ARM architecture, if you want to compile this addons on own PC with different architecture must create a cross compiling environment.

Look here to cross compile openFrameworks guides:
http://openframeworks.cc/setup/raspberrypi/raspberry-pi-cross-compiling-guide/
https://forum.openframeworks.cc/t/cross-compiler-for-of-0-9-0-jessie-arm6-rpi1/21336

the speech create a GPIO simulator looks really interesting, I thank you for the inspiration, just am free from work study the issue in depth.

I keep you updated.

good day

@madc
Copy link
Author

madc commented Mar 31, 2016

Thanks for the links, I'm already familiar with them, but have a somewhat unusual setup (Arch Linux ARM on the PI for example) and try to avoid cross-compiling for now.

I just stumbled across CppGPIO, which seems to work quite well and also has the possibility to simulate GPIOs. Have a look.

In my app, i use it like this:

#ifndef __arm__
GPIO::GPIOBase::simulation(true);
#endif

@kashimAstro
Copy link
Owner

Thank you @madc for this cue,
Last night, I started a small implementation for a simulator I/O GPIO, as you have suggested.

I thought of it a small graphical interface with the two versions of GPIO [A / B] and [A + / B + / 2 / 3] with the ability to enable and disable I/O pin with a click...

and still a little hazy.. all I keep you updated.

if you have other suggestions I'm here to listen!!!

good day

@kashimAstro
Copy link
Owner

gpiosimulator

@kashimAstro
Copy link
Owner

It might be interesting to the management of protocols such as: I2C and SPI, for the simulator....

for i2c you can think of something like this:
https://labjack.com/content/i2c-simulator

@noOblsa1botl
Copy link

noOblsa1botl commented Oct 26, 2017

Правда всё для с++
https://yadi.sk/i/FEpP1-3C3P8HYs Библиотека для Джойстика

https://yadi.sk/i/QdtruzHL3P8HYw Библиотека для ЛСД дисплея

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants