Skip to content

A/D converter on Arduino Uno not working. #993

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

Open
rosslemons opened this issue Apr 17, 2025 · 2 comments
Open

A/D converter on Arduino Uno not working. #993

rosslemons opened this issue Apr 17, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@rosslemons
Copy link

Describe the bug
I wired the 3V3 terminal of the Arduino UNO to A0. analogRead(A0); in the simulation should give 675, but it gives 1023.
To Reproduce
Steps to reproduce the behavior, including link to a simulation project where we can see the problem.

Environment (please complete the following information):

  • OS: [e.g. iOS/Android/Windows] - iOS
  • Browser [e.g. chrome, safari] - Chrome
  • Version [e.g. 22] Version 134.0.6998.166
@rosslemons rosslemons added the bug Something isn't working label Apr 17, 2025
@djedu28
Copy link

djedu28 commented Apr 18, 2025

It's not a bug, but it could be fixed depending on the complexity.

WOKWI has a weak analog signal simulation. Wokwi's simulation was not made for analog signals or "current level" simulation. In short, devices that use analog signals do not communicate with those that use digital signals. There is a simulated analog signal, which you can find in custom chips, and you will see that its signal is completely different from the digital simulation (the focus of Wokwi). And this analog signal only comes from devices built (in Wokwi) specifically to send this signal: for example, a potentiometer, LDR.


Automatically translated.

original text in pt-BR Não é um bug, mas poderá ser consertado dependendo da complexidade.

O WOKWI possui uma fraca simulação de sinal analógico. A simulação do wokwi não foi feita para sinais analógicos ou simulação de "nível de corrente". Em resumo, dispositivos que usam sinal analógico não conversam com os de sinal digital. Existe o sinal analógico simulado, você pode encontrar ele nos chips customizados, e verá que o sinal dele é totalmente diferente da simulação digital (foco do wokwi). E esse sinal analógico só é proveniente dos dispositivos construídos (no wokwi) especificamente para enviar esse sinal: exemplo um potenciômetro, LDR.

@djedu28
Copy link

djedu28 commented Apr 18, 2025

If you really need a strong analog simulation, I recommend looking for tools with this objective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants