- Thu Jan 19, 2017 3:14 pm
#15895
Open Ardustim, then click on the Loop.cpp tab. Find the following code:
dirtyharry wrote: Where abouts in the program is the commented out code for a pot control. Have got it all working and have pre-set the wheel like yourself but I really don't want the gui.
Loosing the will to live with this massively over complicated simulator , many thanks to the creator but something simpler with possibly an lcd display would have been more usable for myself.
Open Ardustim, then click on the Loop.cpp tab. Find the following code:
/* if (adc0_read_complete == true)Un-comment the code by deleting the /* and */ so that it reads
{
adc0_read_complete = false;
tmp_rpm = adc0 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP)
tmp_rpm = TMP_RPM_CAP;
reset_new_OCR1A(tmp_rpm);
}
*/
if (adc0_read_complete == true)I believe that is the only change I made. It defaults to the pot on A0 (adc0) after 5 seconds IF there is no serial connection. So, you must power the auduino via the Vin pin or +5V pin, not the USB.
{
adc0_read_complete = false;
tmp_rpm = adc0 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP)
tmp_rpm = TMP_RPM_CAP;
reset_new_OCR1A(tmp_rpm);
}