Error when running Lego Ultrasonic Sensor Test

Getting an error when trying to run the LEGO-UltraSonic_sensor_Test.py program. The output I’m getting is posted below.

This program was working shortly before and I’m not sure what changed that broke it.

Used troubleshooting.sh to generate Problem ID 16694

It does look like something has started to interfere with the serial line. Have you added any hardware, changed the way you powered the BrickPi+?

I was using the battery pack when it was working, but the battery level went low and it wasn’t allowing me to connect through the vnc so I plugged it into the wall adapter. Would the wall adapter cause this issue? I’ll try replacing the batteries and see if I have the same issue using just the battery pack again. How long should the 8 AA pack last? I only used it for less than a day and it decreased to the point where I couldn’t connect to the BrickPi (no yellow light showing under battery power, only when connected to the wall)

@bbaker.1213: what was the voltage and power rating of the wall adapter. 8 AA battery packs should last an hour with the motors running and a lot more without the motors but it might actually become low after continuously using it for a day.

There are a couple of options to power the BrickPi ad you can find more information about them here.

The best option is to use a USB along with rechargeable batteries for testing and when you are ready, just remove the USB.