ESP32_MPU6050 icon ESP32_MPU6050 — ESP32/Arduino EZB firmware with MPU6050 support: provides accelerometer angles and Yaw/Pitch/Roll gimbal servo values for stabilization and scripting Try it →
Portugal
Asked — Edited
2 Participants
Adding values to variable

Adding Values To Variable

setVar(CLeft,0);
def loop():
  if getVar("$RoombaLightBumperCenterLeft")==1:
     Navigation.SetNavigationStatusToPause();
     print "Bumper Center Left";
     setVar(CLeft)+=1;
     sleep(5);
  if getVar(CLeft)== 2:
       Movement.left(100, 1500);
       setVar(CLeft) == 0;
sleep(2)
 else:
     Navigation.SetNavigationStatusToNavigating();
     time.sleep(1);
  loop();
loop();

I dont get this python. I am trying to add 1 to the variable "CLeft" but my code does not work. Anyone?



Related Hardware (view all EZB hardware)
Roomba by iRobot
Synthiam ARCx turns iRobot Roomba into a drivable robot with scripts, sensors, browser control, and AI-ready robotics skills.
Controller Dependant
Servos ✕
Camera
Audio
UART ✕
I2C
ADC ✕
Digital ✕

Related Robot Skill (view all robot skills)
Real-time EZ-Script console for ARC: enter and execute single-line commands, view output, clear display, and recall history with UP/DOWN.

ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#9  

Yes, the use of getvar for roomba variable is correct. It was cleft that I only mentioned