Module Expr Str Import alias Import alias Import alias Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Num While NameLoad body TryExcept body Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print Str Print NameLoad Assign NameStore BinOpLShift NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Num Print Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpRShift NameLoad Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad Num Num body AugAssignLShift NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num For NameStore Call NameLoad Num Num body AugAssignRShift NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str Assign NameStore Num For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpBitXor Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Print Str For NameStore Call NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Num Break ExceptHandler type NameLoad body Print Str
N/A N/A 
## License

The MIT License (MIT)

GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2015  Dexter Industries

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 N/A time N/A grovepi N/A random N/A ledbar 5 N/A N/A N/A grovepi pinMode ledbar OUTPUT N/A N/A N/A time sleep 1 N/A i 0 N/A True N/A N/A N/A N/A Test 1) Initialise - red to green N/A N/A N/A grovepi ledBar_init ledbar 0 N/A N/A N/A time sleep 0.5 N/A Test 2) Set level N/A i N/A range 0 11 N/A N/A N/A N/A grovepi ledBar_setLevel ledbar i N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A N/A N/A grovepi ledBar_setLevel ledbar 8 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLevel ledbar 2 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLevel ledbar 5 N/A N/A N/A time sleep 0.5 N/A Test 3) Switch on/off a single LED N/A N/A N/A grovepi ledBar_setLed ledbar 10 1 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 9 1 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 8 1 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 1 0 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 2 0 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 3 0 N/A N/A N/A time sleep 0.5 N/A Test 4) Toggle a single LED N/A N/A N/A grovepi ledBar_toggleLed ledbar 1 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_toggleLed ledbar 2 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_toggleLed ledbar 9 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_toggleLed ledbar 10 N/A N/A N/A time sleep 0.5 N/A Test 5) Set state - control all leds with 10 bits N/A i N/A range 0 32 N/A N/A N/A N/A grovepi ledBar_setBits ledbar i N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 6) Get current state N/A state N/A N/A grovepi ledBar_getBits ledbar N/A with first 5 leds lit, the state should be 31 or 0x1F N/A state N/A state N/A state 5 N/A N/A N/A time sleep 0.5 N/A Test 7) Set state - save the state we just modified N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.5 N/A Test 8) Swap orientation - green to red - current state is preserved N/A N/A N/A grovepi ledBar_orientation ledbar 1 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_orientation ledbar 0 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_orientation ledbar 1 N/A N/A N/A time sleep 0.5 N/A Test 9) Set level, again N/A i N/A range 0 11 N/A N/A N/A N/A grovepi ledBar_setLevel ledbar i N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 10) Set a single LED, again N/A N/A N/A grovepi ledBar_setLed ledbar 1 0 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 3 0 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_setLed ledbar 5 0 N/A N/A N/A time sleep 0.5 N/A Test 11) Toggle a single LED, again N/A N/A N/A grovepi ledBar_toggleLed ledbar 2 N/A N/A N/A time sleep 0.5 N/A N/A N/A grovepi ledBar_toggleLed ledbar 4 N/A N/A N/A time sleep 0.5 N/A Test 12) Get state N/A state N/A N/A grovepi ledBar_getBits ledbar N/A state N/A state 5 N/A Test 13) Set state, again N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.5 N/A Test 14) Step N/A i N/A range 0 11 N/A N/A N/A N/A grovepi ledBar_setLevel ledbar i N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 15) Bounce N/A N/A N/A grovepi ledBar_setLevel ledbar 2 N/A state N/A N/A grovepi ledBar_getBits ledbar N/A i N/A range 0 9 N/A N/A state 1 N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.2 N/A i N/A range 0 9 N/A N/A state 1 N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 16) Random N/A i N/A range 0 21 N/A N/A state N/A N/A random randint 0 1023 N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 17) Invert N/A state 341 N/A i N/A range 0 5 N/A N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.2 N/A state N/A 1023 state N/A N/A N/A grovepi ledBar_setBits ledbar state N/A N/A N/A time sleep 0.2 N/A N/A N/A time sleep 0.3 N/A Test 18) Walk through all possible combinations N/A i N/A range 0 1024 N/A N/A N/A N/A grovepi ledBar_setBits ledbar i N/A N/A N/A time sleep 0.1 N/A N/A N/A time sleep 0.4 N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A grovepi ledBar_setBits ledbar 0 N/A N/A N/A IOError N/A N/A Error