This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tankSize": 50, | |
"name": "Toyota Corolla T-Sport" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name":"Debugging of new Widgets","widgets":[{"type":"TodoList","title":"Todo List","settings":{"todos":[]},"w":1,"h":2,"y":0,"x":0,"i":1637132303640,"guid":1637132303640,"moved":false},{"type":"PriceRunnerProductInfo","title":"PriceRunner Price","settings":{"country":"dk","productId":"5182343","name":"Canon EOS R"},"w":1,"h":1,"maxH":1,"y":3,"x":0,"i":1639685400928,"guid":1639685400928,"moved":false},{"type":"PriceRunnerProductInfo","title":"PriceRunner Price","settings":{"country":"dk","productId":"3200433833","name":"Sony A7 IV"},"w":1,"h":1,"maxH":1,"y":4,"x":0,"i":1639685407228,"guid":1639685407228,"moved":false},{"type":"TextWidget","title":"Text","settings":{"message":"Stocks 📈"},"w":1,"h":1,"y":0,"x":1,"i":1639685490469,"guid":1639685490469,"moved":false},{"type":"TextWidget","title":"Text","settings":{"message":"Weather 🌧"},"w":2,"h":1,"y":0,"x":4,"i":1639685553815,"guid":1639685553815,"moved":false},{"type":"TextWidget","title":"Text","settings":{"message":"PriceRunner 📉"},"w":1,"h":1,"y":2,"x":0," |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pybricks.hubs import CityHub | |
from pybricks.pupdevices import DCMotor, Light, ColorDistanceSensor, PFMotor | |
from pybricks.parameters import Button, Color, Direction, Port, Side, Stop | |
from pybricks.robotics import DriveBase | |
from pybricks.tools import wait, StopWatch | |
# Initialize the hub. | |
hub = CityHub() | |
trainMotor = DCMotor(Port.B, Direction.CLOCKWISE) | |
# Initialize the sensor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# good introduction video to "Pybricks": | |
# https://www.youtube.com/watch?v=Jmh4NLxJ_8c | |
from pybricks.pupdevices import DCMotor, ColorDistanceSensor | |
from pybricks.hubs import CityHub | |
from pybricks.tools import StopWatch | |
from pybricks.parameters import Port, Color | |
# Initialize the motor and the sensor. | |
motor = DCMotor(Port.B) | |
sensor = ColorDistanceSensor(Port.A) |
OlderNewer