Module SharedConstants
[hide private]
[frames] | no frames]

Source Code for Module SharedConstants

 1  # SharedConstants.py 
 2  # Remote mode 
 3   
 4  ''' 
 5  Constants and defaults for the RaspiBrick libray based on Pi2Go (full version) from 4tronix. 
 6   
 7   This software is part of the raspibrick module. 
 8   It is Open Source Free Software, so you may 
 9   - run the code for any purpose 
10   - study how the code works and adapt it to your needs 
11   - integrate all or parts of the code in your own programs 
12   - redistribute copies of the code 
13   - improve the code and release your improvements to the public 
14   However the use of the code is entirely your responsibility. 
15  ''' 
16   
17   
18  ''' 
19  History: 
20   
21  V1.00 - Oct 2015: - First public release 
22  V1.01 - Oct 2015: - Added: Button long press event 
23  V1.02 - Dec 2015: - Modified: methods of class Display 
24  ''' 
25   
26   
27  # Be careful: Too many debugging messages may influence running behavior 
28  DEBUG = False 
29   
30  PORT = 1299 
31   
32  # Motor IDs 
33  MOTOR_LEFT = 0 
34  MOTOR_RIGHT = 1 
35   
36  # Infrared IDs 
37  IR_CENTER = 0 
38  IR_LEFT = 1 
39  IR_RIGHT = 2 
40  IR_LINE_LEFT = 3 
41  IR_LINE_RIGHT = 4 
42   
43  # LED IDs 
44  LED_FRONT = 0 
45  LED_LEFT = 1 
46  LED_REAR = 2 
47  LED_RIGHT = 3 
48   
49  # Light sensor IDs 
50  LS_FRONT_LEFT = 0 
51  LS_FRONT_RIGHT = 1 
52  LS_REAR_LEFT = 2 
53  LS_REAR_RIGHT = 3 
54   
55  # Default speeds 
56  MOTOR_DEFAULT_SPEED = 40 
57  GEAR_DEFAULT_SPEED = 30 
58   
59  # Button event constants 
60  BUTTON_PRESSED = 1 
61  BUTTON_RELEASED = 2 
62  BUTTON_LONGPRESSED = 3 
63   
64  # Event poll delay (ms) 
65  POLL_DELAY = 50 
66   
67  ABOUT = "2003-2015 Aegidius Pluess\n" + \ 
68           "OpenSource Free Software\n" + \ 
69           "http://www.aplu.ch\n" + \ 
70           "All rights reserved" 
71  VERSION = "1.01 - Oct 2015" 
72