Skip to content

Add WebSerial Camera Preview #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Jan 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
229f167
Send bytes in chunks
sebromero May 23, 2023
ea9c545
Add web serial camera app
sebromero May 23, 2023
940cf82
Catch edge case
sebromero May 23, 2023
70f6b23
Remove unused code
sebromero May 24, 2023
d54dba8
Working version for RGB
sebromero May 24, 2023
3d0fb5e
Working version for both
sebromero May 24, 2023
599e764
Add image processor
sebromero May 24, 2023
66f1a02
Add save function
sebromero May 24, 2023
5ced73c
Implement connection handler
sebromero May 24, 2023
e2789f4
Add callbacks for connect / disconnect
sebromero May 24, 2023
a85053c
Add documentation to serial connection handler
sebromero May 24, 2023
fe1cef1
Better error reporting
sebromero May 26, 2023
a7a35a0
Change order of config bytes
sebromero Jun 30, 2023
2313636
Add auto config for camera
sebromero Jun 30, 2023
fb8a54f
Better error handling
sebromero Dec 29, 2023
7149a1b
Extract magic strings
sebromero Dec 29, 2023
e2e949b
Add references
sebromero Dec 29, 2023
815151d
Stream works, disconnect broken
sebromero Dec 29, 2023
084393b
Fix deadlock
sebromero Dec 29, 2023
302c8a6
Add documentation to image processor
sebromero Dec 29, 2023
8d7a3fa
Add docs to config file
sebromero Dec 29, 2023
1e5cdc8
Use default serial values
sebromero Jan 8, 2024
8a3ca3b
Remove dependency on 2D Context
sebromero Jan 8, 2024
29adcd8
Working with new transformer
sebromero Jan 8, 2024
d7d0819
Add documentation to app file
sebromero Jan 8, 2024
c656793
Add more documentation
sebromero Jan 8, 2024
28d4e37
Add dedicated sketch for WebSerial
sebromero Jan 9, 2024
b6d20c4
Add filters
sebromero Jan 9, 2024
41fbc7a
Fix incorrect variable name
sebromero Jan 9, 2024
e343588
Add documentation
sebromero Jan 9, 2024
354a32b
Merge branch 'main' into sebromero/web-camera
sebromero Jan 9, 2024
4c58a74
Restore original sketch
sebromero Jan 9, 2024
e9aa024
Add setter for connection timeout
sebromero Jan 17, 2024
c9299d4
Add start stop sequence transformer
sebromero Jan 17, 2024
4f72204
Better handle data in transformer
sebromero Jan 17, 2024
5aa18d7
Refactor example sketch
sebromero Jan 17, 2024
a6ea68f
Use red LED to indicate errors
sebromero Jan 17, 2024
b696b59
Clarify sketch instructions
sebromero Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use red LED to indicate errors
  • Loading branch information
sebromero committed Jan 17, 2024
commit a6ea68f0b0b71cfb596e5883de0b543006390d43
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,30 @@ FrameBuffer fb;

/**
* Blinks the LED a specified number of times.
*
* @param ledPin The pin number of the LED.
* @param count The number of times to blink the LED. Default is 0xFFFFFFFF.
*/
void blinkLED(uint32_t count = 0xFFFFFFFF) {
void blinkLED(int ledPin, uint32_t count = 0xFFFFFFFF) {
while (count--) {
digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin, LOW); // turn the LED on (HIGH is the voltage level)
delay(50); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW
digitalWrite(ledPin, HIGH); // turn the LED off by making the voltage LOW
delay(50); // wait for a second
}
}

void setup() {
pinMode(LED_BUILTIN, OUTPUT);
pinMode(LEDR, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(LEDR, HIGH);

// Init the cam QVGA, 30FPS
if (!cam.begin(RESOLUTION, IMAGE_MODE, 30)) {
blinkLED();
blinkLED(LEDR);
}

blinkLED(5);
blinkLED(LED_BUILTIN, 5);
}

/**
Expand Down