forked from XilefTech/CharlieOSX
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
Latest commit
25 lines (18 loc) · 680 Bytes
/
Copy pathmain.py
File metadata and controls
25 lines (18 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env pybricks-micropython
#from UI.uiManager import UIManager
fromcharlieosximportCharlieOSX
frompybricks.toolsimportprint, StopWatch
frompybricks.parametersimport (
Port, Stop, Direction, Button, Color, SoundFile, ImageFile, Align)
frompybricks.ev3devicesimport (
Motor, TouchSensor, ColorSensor, InfraredSensor, UltrasonicSensor, GyroSensor)
frompybricks.hubsimportEV3Brick
importtime
# example code to start CharlieOSX and it's menu-system
os=CharlieOSX('config.cfg', 'settings.json', '')
os.ui.mainLoop()
# example for driving straight
#os.robot.straight(100, 20, 0)
# x = UIManager('', '', EV3Brick(), '')
# print(x)
# time.sleep(10)