Repository navigation
Conversation
- Implement visitor, validator, and generator workers for simulation opcode generation. - Support driving, single motors, 5x5 display, tones, status RGB LED, buttons, and sensors (ultrasonic, color, touch/force, gyro, gestures). - Add frontend RobotSpike, SpikeChassis, and SpikeDisplay with square pixels and interactive Hub SVG controls. - Enable robot.multisim and getsimulationcode workflow in spike and spikePybricks properties.
The simulated touch sensor only returns the boolean pressed state, but not the numeric force value. The new force sensor also returns a force value so it can be used in simulation. The force value is simplified to 0 when not pressed and 100 when pressed.
|
Thanks for the fixes, @AlvaroCalderonToledo! I pulled the commit locally and tested the simulator today while teaching a Roberta class with 23 kids. Everything works as expected, but I discovered one missing feature in my first commit: The touch sensor did not work in the simulator with a numeric force value, only with the boolean "pressed" state. That's why I introduced a LMK if you have any other comments or concerns. |
|
Thanks, @chrschng ! I pushed a small follow-up on top of your force sensor commit. |
|
Thanks again, @AlvaroCalderonToledo, the code looks cleaner now. I tested the code with your fix for both the Spike and EV3 simulator, it works as expected. The code is good now from my side. |
|
Thanks again @chrschn ! Everything looks good from my side as well. |
|
Good catch, @AlvaroCalderonToledo! This dependency was added for an attempt to add a unit test, but it didn't add much value, so I dropped it again. Now I also removed the dependency. |
This PR adds simulator support for Spike Prime.