void loop()
{
uint16_t tmp_rpm = 0;
/* Just handle the Serial UI, everything else is in
* interrupt handlers or callbacks from SerialUI.
*/
if(Serial.available() > 0) { commandParser(); }
if(mode == POT_RPM)
{
if (adc5_read_complete == true)
{
adc5_read_complete = false;
tmp_rpm = adc5 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP) { tmp_rpm = TMP_RPM_CAP; }
wanted_rpm = tmp_rpm;
reset_new_OCR1A(tmp_rpm);
}
}
if(mode == POT_RPM) LCD_Update(1);
if(serial_upd)
{
LCD_Update(0);
LCD_Update(1);
serial_upd = false;
}
}
> Blok Kutipan
potensio and touch screen not working im called tp point
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help
Can you format the code using <code>
tag as @UKHeliBob says it would be easy to understand code and help you
What problem are you facing actually?
void loop()
{
uint16_t tmp_rpm = 0;
/* Just handle the Serial UI, everything else is in
* interrupt handlers or callbacks from SerialUI.
*/
if(Serial.available() > 0) { commandParser(); }
if(mode == POT_RPM)
{
if (adc5_read_complete == true)
{
adc5_read_complete = false;
tmp_rpm = adc5 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP) { tmp_rpm = TMP_RPM_CAP; }
wanted_rpm = tmp_rpm;
reset_new_OCR1A(tmp_rpm);
}
}
if(mode == POT_RPM) LCD_Update(1);
if(serial_upd)
{
LCD_Update(0);
LCD_Update(1);
serial_upd = false;
}
}
potensio & tft not working when I call tp points in the void loop
can a friend give me advice?Sorry, I can not speak English
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.