microsoft / pxt-ev3 Goto Github PK
View Code? Open in Web Editor NEWMicrosoft MakeCode editor for the LEGO MINDSTORMS EV3 Brick
Home Page: https://makecode.mindstorms.com/
License: Other
Microsoft MakeCode editor for the LEGO MINDSTORMS EV3 Brick
Home Page: https://makecode.mindstorms.com/
License: Other
The simulator will act as a virtual VM of the EV3 and responds to the same messages sent between our code and the VM code.
The issue is there is a circular dependency here, we need to know what devices are connected in order to communicate on that channel, but there's no way for the simulator to know what devices are connected without something like a designer or some form of reachability.
https://github.com/Microsoft/pxt-ev3/blob/master/libs/core/input.ts#L86
is the point in the code that we poll every 500ms to detect devices, in the simulator we get a message asking us what is connected on each port, but there's no way for us to tell? so it assumes no devices are connected, and thus no subsequent code will run.
I'm facing this weird decompilation bug. This is the API:
onForTime(power: number, ms: number, brake = false) {
And the code that does not decompile
output.motorA.onForTime(50, 500, false)
Try and the device crashes immediately:
control.waitForEvent(0, 0)
The current polling API is not friendly. It should be an event.
Looking at the code, we only query for changes of the color sensor when the mode is set to Color, and not for AmbientLightIntensity or ReflectedLightIntensity.
@cait1inhennessy have you verified that the ambient and reflected colors work on the physical device? If so, I'm struggling to explain why..
see: https://github.com/Microsoft/pxt-ev3/blob/master/libs/color-sensor/color.ts#L82
When a motor is moving in the simulator, it would be good to play a sound to help "emulate" the experience.
Asked Sune for a file.
LEGO to provide design/art for home screen banner
"Touched" , "Bumped", "Released" is the correct terminology.
Groups are now matching hardware components.
We need some way in the runtime to wait for an event to happen, similar to the control waitForEvent block.
Images are found in the BrickResources folder when installing the full EV3 editor
See https://github.com/devongovett/tiny-inflate
Need to do it before release.
There's a TypeScript-ified version checked in as inflate.ts see 9cdb408
Try decompiling and you'll lose the image.
brick.showImage(images.expressionsBigSmile)
and it becomes
brick.showImage(null)
Current image is here:
LEGO-EV3-v1.09D-patched-UF2-rtl8192cu.zip
Support for detecting that a color changed or dark/light conditions changed.
Detect that something is getting near.
Scan resource, extract programs and copy them into the thread of each corresponding hardware component. This will help understand how people expect to program these devices.
... add more here
Implement flashing and pulsing colors for the brick led in the sim.
If we register for both IR button and distance alarm, only one of them will work (the last one likely)
Similarly, once we have events for color detection and ambient light detection, only one of them will work.
We need some way of warning the user I think, eg from the simulator.
LEGO to provide SVG of the input ports.
LEGO to provide SVG for output ports
Ability to drop a boolean expression that gets evalutated in a busy loop.
https://github.com/Microsoft/pxt-ev3/tree/wait
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.