An interested in finding a way that I can do repletion of a previously called function when the signals of the infrared remote are received. Any moment I hold a button of my infrared remote, it gives out hex digits of F only. Currently am trying to do a program writeup that if my device will receive the F’s again, it can be able to do a repetition of the previously ran function. https://www.theengineeringprojects.com/2021/10/data-types-variables-and-operators-in-c.html
This program am doing for my small osoyoo kit of my car.
/*
enum DN
GO_REPEAT,
DEF
Drive_Num=DEF;
void go_Advance(void) //Forward
{
digitalWrite(RightDirectPin1,LOW);
digitalWrite(RightDirectPin2,HIGH);
digitalWrite(LeftDirectPin1,LOW);
digitalWrite(LeftDirectPin2,HIGH);
analogWrite(speedPinL,100);
analogWrite(speedPinR,100);
}
void do_Drive_Tick()
{
switch (Drive_Num)
{
case GO_REPEAT://Need code here to repeat previous function (in this case it was GO_ADVANCE)
case GO_ADVANCE:go_Advance();JogFlag = true;JogTimeCnt = 1;JogTime=millis();break;
case GO_LEFT: go_Left();JogFlag = true;JogTimeCnt = 1;JogTime=millis();break;
default:break;
*/