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

Some plan for emulating digitalRead() ? #13

Open
Lecrapouille opened this issue Jul 2, 2022 · 2 comments
Open

Some plan for emulating digitalRead() ? #13

Lecrapouille opened this issue Jul 2, 2022 · 2 comments

Comments

@Lecrapouille
Copy link
Contributor

Lecrapouille commented Jul 2, 2022

Any idea on how to emulate digitalRead in
https://github.com/ChrisMicro/ArduinoOnPc/blob/master/src/cores/arduino/wiring_digital.cpp#L35 ?

  • Keyboard cannot be used since can interfering with serial link.
  • Like kernel polling files and doing some echo "1" > gpio_3
  • Other idea ?

See also marcmerlin#8

@ChrisMicro
Copy link
Owner

Using a file input could be a good solution. This would also account for analogRead.
Another (but more difficult to implement solution) could be to make a graphical interface input. Just using the functions in the button example
https://github.com/ChrisMicro/ArduinoOnPc/tree/master/examples/guiButton
as an interactive input.

@Lecrapouille
Copy link
Contributor Author

Yes kind of integrated GUI (like GTK+, DearIMGui ...)

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

2 participants