Arduino Alvik loops forever in _wait_for_ack

Hello, I can't initialize my Arduino Alvik, as the following code running in Arduino Lab:

from arduino_alvik import ArduinoAlvik
from time import sleep_ms
import sys

alvik = ArduinoAlvik()
alvik.begin()

forever loops in function _wait_for_ack(self). The value of self._last_ack remains 'None' without ever updating.

When I stop the program (demo program for example), I get:

Traceback (most recent call last):
File "", line 1, in
File "demo.py", line 6, in
File "/lib/arduino_alvik/arduino_alvik.py", line 190, in begin
File "/lib/arduino_alvik/arduino_alvik.py", line 204, in _wait_for_ack

I've updated my Alvik to the latest MycroPython version (MicroPython v1.23.0 on 2024-06-02; Arduino Nano ESP32 with ESP32S3) but the issue remains.

Could anyone help me solving this issue ?

Moreover, I don't know if it is related with this issue but there is an orange LED that is ON, just left of the QWIIC connector of my Arduino Alvik. I can't see such an orange light on the pictures in the Alvik user manual.

Disassemble it and find out? My guess is the battery state (charging, full, empty).

When I turn mine on that light flashes once or twice.

Do you have the power switch in the back on? Do you have the green led there?

Hello, thank you for your answers. The battery is currently 97% full (often 100%) and I have not dared disassemble the robot yet.
When I connect the Alvik to my PC (USB-C cable), the power switch is OFF so only the µC is ON. Then I switch the power ON in the back before executing any program. The green LED next to the power switch is ON.
So I understand that the orange light shouldn't stay ON and I will try to find out an explanation for that.

Finally, I have disassembled my Alvik and everything looks just fine.

Here are results of some more tests with my robot (standalone):

  • When I switch it ON : the power LED turns green, like the one on the Nano ESP32 µC. The LED left to the QWIIC connector turns orange and both DL1 and DL2 on the top turn "white green"
  • When clicking on the reset button underneath the robot, the orange LED and DL1 switch OFF, and DL2 turns "green".
  • 2s after releasing the reset button, the situation comes back like previous step.

Unfortunately, I can't find any documentation regarding the LEDs on Alvik's Block Diagram (bottom view), so it's hard to understand the issue.

hi @loicv ! Did demo start when you open the box?

Before you disassembled the robot, orange led was on but what about DL1 and DL2 (lime color)?

Note: When robot starts (carrier+sensor bar) DL1, DL2 and led builtin are turned on until sensor calibration is ended. Rear orange led could blink in a pattern to show an error code.

Another question is: could you share photos of your sensor bar? It could be an issue related to the Time Of Flight sensor if it has the yellow tape on it.

Let me know

Hi @giovannibruno, yes indeed, demo started when I first opened the box. I can't however remember when it stoped working, but it was a few days after starting to play with the robot (follow the "Ready, Set, Code" lesson).

Before disassembling the robot, orange led was indeed ON, and both DL1 and DL2 were lime green.
To show the exact robot startup sequence, I've recorded a short movie. The sequence starts when I switch it ON, until nothing changes anymore (orange LED on + DL1 and DL2 lime green):

Alvik_switching-on

We can see a small delay when DL1 and DL2 switch off, but orange led doesn't blink or show any error pattern.

Moreover, here is a photo of the sensor bar. There is no yellow tape on it:

Kind regards

@loicv the sequence in your video means that it works correctly.
If demo worked out of box, it means that you have a fully working unit without defects or bugs.

So, which is the bad behaviour? Are you running some scripts? If yes, please share here

@giovannibruno , I could run the demo when I took the Alvik out of the box and for about 1 week. But due to an unknown reason, I can't run any script anymore as they never exit the alvik.begin() function.
In Arduino Lab, I can only see half of the snake I could see (as begin() never exists the while loop in _wait_for_ack).

Tonight, I download and installed again the latest release from Releases · arduino/arduino-alvik-mpy · GitHub and the latest version of the firmware:

install.bat -p COM4

cd utilities
flash_firmware.bat -p COM4 firmware_1_0_1.bin

cd ..\examples
mpremote connect "COM4" fs cp ./hand_follower.py :hand_follower.py

But it doesn't change anything: the demo script is not working anymore.

Oooh, before giving up, I've just tried to slowly move the board close to the "barred hand" sign, and the LEDs have changed their behavior: the orange led flashed every 5s or so.
After doing it again, the orange led has turned off, while DL1 and DL2 are now blue and a shiny white led under the Alvik is on.
I'm stopping for now but will try other tests later.

@loicv so now it is working correctly (leds off and then blue means that demo launcher started)
probably there was a disalignment between sensor bar and carrier and I2C communication stucks.

Did your robot got some knocks or something like that?

Ok, I think I have a clue: I've opened the robot again and sensor B's connector is unsoldered :worried: (I realize that I saw it last time without paying much attention)

I don't know if it's possible to change/solder this connector again, or whether it is possible to update Alvik's code to bypass sensor B's acknowledgment (I'll try that first).

@giovannibruno , I'm not aware of any knock and the box did not fall. The issue arose before I first opened the robot and I can't understand what caused the connector to get unsoldered (I am not brutal with robots :grin:).
Anyway, I now know what causes the issue and I'll try to repair it.

I thank you for your time and help!

hi @loicv, you could skip the initialization of sensor bar by commenting following lines:

About the connector it is very strange. I think you could replace it quite easily or try to fix it

1 Like