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
| #include <SerialDisplay.h> | |
| const int pinOE = D2; | |
| const uint8_t totalModulos = 4; | |
| SerialDisplay displays(D3, D4, totalModulos); // (data, clock, number of modules) | |
| int pwm = 0; | |
| void setup(){ | |
| Serial.begin(115200); | |
| displays.setBrightnessPin(pinOE); |
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
| const onVmInit = vm => { | |
| // Load a project from a URL. Example: ?project_url=/example.sb3 | |
| let projectLoaded = false; | |
| // We need to wait the VM start and the default project to be loaded before | |
| // trying to load the url project, otherwiste we can get a mix of both. | |
| vm.runtime.on('PROJECT_LOADED', () => { | |
| if (!projectLoaded) { | |
| const projectFileMatches = window.location.href.match(/[?&]project_url=([^&]*)&?/); | |
| const projectFile = projectFileMatches ? decodeURIComponent(projectFileMatches[1]) : null; | |
| if (projectFile) { |