Skip to content

Are pin I/O functions currently implemented? #1

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

Closed
twoporylyj opened this issue Sep 25, 2021 · 3 comments
Closed

Are pin I/O functions currently implemented? #1

twoporylyj opened this issue Sep 25, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested

Comments

@twoporylyj
Copy link

Greetings. Are pin I/O functions currently implemented? They are mentioned only in English manual, and their syntax is not described. Thanks.

@starling13
Copy link
Collaborator

starling13 commented Oct 19, 2021

Hello. Yes, on Arduino platform functions are implemented.

To enable Arduino IO module in basic_config.hpp:

// Arduino IO module
#define CONF_MODULE_ARDUINOIO      1

In HAL_arduino.h:

#define HAL_GPIO_ARDUINO HAL_GPIO_ARDUINO_CORE

Yes, manual only mentioned them...

Commands
AWRITE pin number, pin value - sets value to pin
DNOTONE pin number - disables sound on the pin
DTONE pin number, frequency, duration - begins sound generation on the pin
DWRITE pin number, pin state - sets pin into boolean state

Functions:
AREAD(pin number) returns real type value of the voltage
AREAD%(pin number) returns integer type value of the ADC code
DREAD(pin number) returns boolean value of the pin state

@twoporylyj
Copy link
Author

Do you mean that these functions are disabled by default, and have to be enabled this way before compiling the interpreter?

@starling13
Copy link
Collaborator

starling13 commented Oct 27, 2021

Indeed! And I fixed wrong formatting of the syntax above

@starling13 starling13 added documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants