ryansuchocki / microscheme

A Scheme subset for Atmel microcontrollers.
http://ryansuchocki.github.io/microscheme/
MIT License
300 stars 20 forks source link

Add support for analog input/output #38

Closed glv2 closed 2 years ago

glv2 commented 3 years ago

I only tested the UNO model, as I only have Arduino Nano boards.

glv2 commented 3 years ago

I added a commit with a few functions to help setting the hardware registers in Scheme instead of having to use assembly. It should make writing libraries for things that are not implemented in the standard library easier (e.g. I2C, different parameters for ADC, etc).

glv2 commented 3 years ago

Rebased on master (432452baa18f72ac4d9c72b5a7bd601f29a4139b) to fix the conflict with PR #40.

ryansuchocki commented 3 years ago

@glv2 thanks for all your work on this.

There is some basic documentation for microscheme which is hosted as the "GitHub pages" site for this repo. It used to be on a separate branch but now I've moved it to /docs on master so that it's easier to keep things like the list of primitive procedures "in sync".

It would be great if you could update docs/documentation.html under this PR.

glv2 commented 3 years ago

I added a commit updating the procedure lists in docs/documentation.html.

ryansuchocki commented 2 years ago

I've just created src/avr_core.ms so that src/stdlib.ms can be restricted to platform-independent language features. If you merge/rebase and move the new analog functions into avr_core then I'll merge the PR. Thanks again for the contribution.

glv2 commented 2 years ago

Rebased