wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
462 stars 73 forks source link

Arduino Mega 2560: Analog inputs A8 ... A15 #105

Closed Koepel closed 2 years ago

Koepel commented 2 years ago

The analog inputs A8 ... A15 are just copies of A0 ... A7 on the Arduino Mega board.

Wokwi test simulation: https://wokwi.com/arduino/projects/308791757053624896

When I want to make a Wokwi project for the Arduino forum, then sometimes those analog inputs are used and the project can not be simulated in Wokwi.

urish commented 2 years ago

Thank you so much for the detailed bug report!

This should be fixed now. I reworked the entire ADC peripheral from the hacky 6-line implementation we had into something a bit more complete. This means we should also support setting the reference voltage to internal 1.1V and even differential channels. I haven't had a chance to test these features yet, but they are merged in wokwi.com, so they should be available as well.