Hi y'all, newbie here.....Does anybody know if there exists a "virtual Arduino Board"? Ya know, like a virtual machine that works with the Arduino sketches. Don't know if I'm clear.....I was just thinking that when I travel and I'm trying to learn this stuff it would be nice just to open up my laptop and begin programming a virtual arduino board....maybe add the resistors and components and what not's virtually, so to speak...rather than lug around a physical board and individual components. Thanks.
Look for "ATMEGA328p simulator". For testing sketches etc., you simulate the chip, not the whole Arduino board. Apart from the AVR's own simulator there are others around too. I don't use these, however, so I can't help further.
Such a simulator will not be very useful without attached I/O parts. Simulators are fine for debugging general purpose CPU code, which reads data from files or a console, and writes output to the console or other files, but not for real time processing.
It's easy to put buttons and LEDs onto a GUI, and make digitalRead() read the button states, and digitalWrite() turn the LEDs on and off. But for more complex circuits, like sensors, motors or I2C/SPI modules, the simulation of these devices and their behaviour over time (motor acceleration and speed...) will exceed the efforts for simulating the controller.
For basic programming you can build your own Arduino USB stick or box, based e.g. on an Arduino Nano, with added buttons and LEDs, and eventually a pot or LDR for analog input. Then you can learn how to debounce switches, and to dim LEDs using PWM, and how to make happen multiple things at a time - in real time
Ok. Thanks.....I just ordered the nano. It's pretty compact and yes, real hardware might be better for learning.