Vernier Acceleration Sensor Python

From wikiluntti
Revision as of 19:14, 21 September 2020 by Mol (talk | contribs) (Created page with "=== Introduction === === Python: Check the modes === <code> #!/usr/bin/env python3 # https://sites.google.com/site/ev3devpython/ from ev3dev2.sensor import * from ev3dev2.s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

Python: Check the modes

  1. !/usr/bin/env python3
  2. https://sites.google.com/site/ev3devpython/

from ev3dev2.sensor import * from ev3dev2.sensor import INPUT_1

import time

p = Sensor( INPUT_1 ) while 1:

   print( p.modes )
   time.sleep(5)

Returns the following modes 'ref-raw', 'rgb-raw' and 'col-cal'