UNO Q: Running MPU driven LED1_R from Shell Terminal

The following steps have not helped me to blink the above LED1_R from Shell Terminal.

  1. I am in SBC Mode.
  2. I have opened Shell Terminal.
  3. I have given the following command to create/open/edit file named blinkled1r.py
    nano blinkled1r.py
  4. I have entered the following codes in the edit window.
import time
from arduino.app_utils import App, Leds, Bridge

def loop():
    # Turn on the LED red segment (1, 0, 0)
    Leds.set_led1_color(1,0,0)
    time.sleep(1)
    Leds.set_led1_color(0,0,0)
    time.sleep(1)

App.run(user_loop=loop)
  1. I have saved the file and exited the edit window.

  2. I have given the following command to execute the saved python file.
    python3 blinkled1r.py

  3. The LED1_R is not blinking.

  4. This is the error message:
    arduino is not found.

I would appreciate help to solve this problem. The script runs well from App Lab Interface.

Hi @GolamMostafa.

This occurs because you don't have the arduino Python package installed in the environment in which your Python script is running. The package is pre-installed in the Docker container used by Arduino Apps, but if you aren't using the App framework then you would need to install the package manually.

I provided some information about doing that here: