We are closed until COVID-19 restrictions are lifted - there is no shipment and limited support during this period

The following information is for the EMANT380

Turn on and off the LEDs Portwise


  • Digital Output
  • LED

The difference between this program and the previous one is that the Digital Port is written portwise ie 8 bits at a time.


import emant import time m = emant.Emant300() m.Open("00:06:66:00:a1:D8") print m.HwId() count = 0 while count < 8: m.WriteDigitalPort(count) count += 1 time.sleep(1) m.Close()

Code Explained


The output bits are determined by the count value
8 – 0000 0111 all LEDs are turned off
7 – 0000 0110 only Green LED is turned on
0 – 0000 0000 all LEDs are turned on