Skip to content

Commit 9ae3ef3

Browse files
committed
Update examples
1 parent 160fe5d commit 9ae3ef3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Diff for: examples/Wasm_Dino_ESP32_TDisplay/Wasm_Dino_ESP32_TDisplay.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define BUTTON_UP 35
1717
#define BUTTON_DOWN 0
1818

19-
#define DISPLAY_BRIGHTESS 1 // 0..255
19+
#define DISPLAY_BRIGHTESS 128 // 0..255
2020

2121
TFT_eSPI tft = TFT_eSPI(135, 240); // Invoke custom library
2222

@@ -27,7 +27,7 @@ TFT_eSPI tft = TFT_eSPI(135, 240); // Invoke custom library
2727
* export PATH=/opt/wasp/build/src/tools:$PATH
2828
* wasp wat2wasm --enable-numeric-values -o dino.wasm dino.wat
2929
* xxd -iC dino.wasm > dino.wasm.h
30-
*
30+
*
3131
* Note: In Arduino IDE, select Tools->Optimize->Faster (-O3)
3232
*/
3333
#include "dino.wasm.h"

Diff for: examples/Wasm_Dino_PyBadge/Wasm_Dino_PyBadge.ino

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
#include <wasm3.h>
1010
#include <m3_api_defs.h>
1111

12+
#define DISPLAY_BRIGHTESS 128 // 0..255
13+
1214
/*
1315
* Dino game by by Ben Smith (binji)
1416
* https://github.com/binji/raw-wasm/tree/master/dino
1517
* To build:
1618
* export PATH=/opt/wasp/build/src/tools:$PATH
1719
* wasp wat2wasm --enable-numeric-values -o dino.wasm dino.wat
1820
* xxd -iC dino.wasm > dino.wasm.h
19-
*
21+
*
2022
* Note: In Arduino IDE, select Tools->Optimize->Faster (-O3)
2123
*/
2224
#include "dino.wasm.h"
@@ -103,7 +105,7 @@ void init_device()
103105
FATAL("arcadaBegin", "failed");
104106
}
105107
arcada.displayBegin();
106-
arcada.setBacklight(128);
108+
arcada.setBacklight(DISPLAY_BRIGHTESS);
107109
}
108110

109111
void display_info()
@@ -123,7 +125,7 @@ void setup()
123125

124126
// Wait for serial port to connect
125127
// Needed for native USB port only
126-
while(!Serial) {}
128+
//while(!Serial) {}
127129

128130
Serial.println("\nWasm3 v" M3_VERSION " (" M3_ARCH "), build " __DATE__ " " __TIME__);
129131

0 commit comments

Comments
 (0)