Commit Graph

28435 Commits

Author SHA1 Message Date
Jeff Epler
1d1e139379
fix taking multiple pictures 2022-08-04 15:11:53 -05:00
Jeff Epler
b903a020fd
Enable display on esp32-s3-eye 2022-08-04 15:11:52 -05:00
Jeff Epler
8d673bdbf5
reserve 1MB of PSRAM for camera framebuffer on esp32s3-eye
.. this setting can be overridden with a bigger or smaller value in
CIRCUITPY/.env but 1/8 of PSRAM seems like a good initial value. It's
enough to store a single 800x600 or 640x480 RGB565 frame, or multiple
smaller frames such as 320x240.
2022-08-04 15:11:51 -05:00
Jeff Epler
5db6db0128
add esp32-camera
This uses the esp32-camera code instead of our own homebrewed camera code.
In theory it supports esp32, esp32-s2 and esp32-s3, as long as they have
PSRAM.

This is very basic and doesn't support changing any camera parameters,
including switching resolution or pixelformat.

This is tested on the Kaluga (ESP32-S2) and ESP32-S3-Eye boards.

First, reserve some PSRAM by putting this line in `CIRCUITPY/_env`:
```
CIRCUITPY_RESERVED_PSRAM=524288
```
and hard-reset the board for it to take effect.

Now, the following script will take a very low-resolution jpeg file and print
it in the REPL in escape coded form:

```python
import board
import esp32_camera

c = esp32_camera.Camera(
    data_pins=board.CAMERA_DATA,
    external_clock_pin=board.CAMERA_XCLK,
    pixel_clock_pin=board.CAMERA_PCLK,
    vsync_pin=board.CAMERA_VSYNC,
    href_pin=board.CAMERA_HREF,
    pixel_format=esp32_camera.PixelFormat.JPEG,
    i2c=board.I2C(),
    external_clock_frequency=20_000_000)

m = c.take()
if m is not None:
    print(bytes(m))
```

Then on desktop open a python repl and run something like
```python
>>> with open("my.jpg", "wb") as f: f.write(<BIG PASTE FROM REPL>)
```
and open my.jpg in a viewer.
2022-08-04 15:11:50 -05:00
Jeff Epler
07afb3eab8
Fix typo 2022-08-04 15:11:49 -05:00
Jeff Epler
8e08cc38f8
Add default I2C bus to Kaluga 2022-08-04 15:11:48 -05:00
Jeff Epler
5ac3aeaac7
Remove unused header 2022-08-04 15:11:47 -05:00
Jeff Epler
82be75adb5 Add ability to reserve psram
.. the primary user of which will be the camera, since the framebuffers
must be allocated via esp-idf allocation function and never from the
gc heap.

A board can have a default value, and the value can also be set in the
/.env file using the key CIRCUITPY_RESERVED_PSRAM with the value being
the reserved size in bytes.

Co-authored-by: Dan Halbert <halbert@adafruit.com>
2022-08-03 16:19:40 -05:00
Scott Shawcroft
d659a3b457
Merge pull request #6690 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-08-02 22:41:45 -07:00
Hosted Weblate
fde916d4ac
Merge remote-tracking branch 'origin/main' 2022-08-03 03:36:41 +02:00
Dan Halbert
291994b7d6
Merge pull request #6686 from andywarburton/main
WebWorkFlow CSS Tweaks for edit.html
2022-08-02 21:36:37 -04:00
Hosted Weblate
c6e527d72e
Merge remote-tracking branch 'origin/main' 2022-08-03 03:35:06 +02:00
Dan Halbert
767234e79c
Merge pull request #6688 from tannewt/fix_esp32c3_paste
Fix C3 when pasting 128+ characters
2022-08-02 21:35:02 -04:00
Hosted Weblate
8bd54726e4
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2022-08-03 03:31:53 +02:00
Dan Halbert
524cc5e274
Merge pull request #6685 from tannewt/esp32_ww
Enable Web Workflow on Feather ESP32 V2
2022-08-02 21:30:23 -04:00
Mark
febedeb3f7
Merge pull request #6687 from tannewt/fix_esp32_sx_usb
Fix S2/S3 USB
2022-08-02 19:41:29 -05:00
Scott Shawcroft
9de8ae70b6
Fix C3 when pasting 128+ characters
The ringbuf used to fill up and the recv interrupt would block CP.
Now it'll disable the interrupt until we have enough room in the
ringbuf.

Fixes #6678
2022-08-02 15:25:19 -07:00
Scott Shawcroft
1c69fe1727
Fix S2/S3 USB
The new Kconfig that fixed C3 added a dependency on USB_OTG_SUPPORTED
that is only calculated if we include the usb module in cmake.

Fixes #6679
2022-08-02 14:11:09 -07:00
Andy Warburton
019fbb1cb9 Merge branch 'main' of https://github.com/andywarburton/circuitpython 2022-08-02 21:10:46 +01:00
Andy Warburton
b67f3585e8 css tweaks for edit.html
added remote css support to webworkflow edit.html and moved in page css out to the external stylesheet.
2022-08-02 21:10:39 +01:00
Scott Shawcroft
74e841d835
Read fuses to know what flash and ram pins to never reset 2022-08-02 12:01:42 -07:00
Scott Shawcroft
b38109c488
Merge pull request #6682 from andywarburton/main
added remote CSS links to web work flow
2022-08-02 11:03:42 -07:00
Scott Shawcroft
f8c183bf3a
Merge pull request #6683 from Neradoc/nera-web-workflow-2
Add Authorization to Allow-Headers in web workflow
2022-08-02 11:02:30 -07:00
Scott Shawcroft
cb2e1e0064
Merge pull request #6680 from FoamyGuy/edit_url_fix
fix edit URL for files inside of directories
2022-08-02 10:54:19 -07:00
Neradoc
063e168810 Add Authorization to Allow-Headers in web workflow
Makes Safari happy
2022-08-02 18:40:10 +02:00
Andy Warburton
5d653772cd added version number to file name
added version number to file name
2022-08-02 16:43:40 +01:00
Andy Warburton
1448bcab6b added remote CSS links to web work flow
added remote css URL to pull additional CSS from the circuitpython.org site (apologies for the  black background - this is temporary, I'll send an update to the CP.org css *very* shortly that will undo this)
2022-08-02 16:36:20 +01:00
foamyguy
da8451b7cc fix edit URL for files inside of directories 2022-08-01 21:56:11 -05:00
Scott Shawcroft
f0c6a8c49a
Odroid pin defs 2022-08-01 15:52:08 -07:00
Scott Shawcroft
9661d3256c
Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
Dan Halbert
664cadc3ac
Merge pull request #6670 from dhalbert/fix-samd-i2c-freq-check
Fix SAMD I2C frequency check
2022-08-01 14:08:54 -04:00
Dan Halbert
9baa2724a7 code formatting suggestion 2022-08-01 00:27:25 -04:00
Scott Shawcroft
462eb71570
Merge pull request #6611 from FoamyGuy/webflow_edit_page
Webflow edit page
2022-07-29 16:30:53 -07:00
Dan Halbert
1348cb435b Fix SAMD I2C frequency check 2022-07-29 19:07:33 -04:00
Dan Halbert
8b2f061563
Merge pull request #6666 from tannewt/fix_web_paste
Lots of web workflow, C3 and title bar fixes
2022-07-29 17:10:46 -04:00
Scott Shawcroft
312e298890
Fix other ESP builds and arduino_nano_33_iot 2022-07-29 11:02:35 -07:00
Scott Shawcroft
3612ce2ea7
Merge pull request #6665 from dhalbert/fix-macos-mpy-cross-name
fix name for macOS mpy-cross universal build
2022-07-29 10:14:08 -07:00
Scott Shawcroft
51006f5eeb
Merge branch 'main' into webflow_edit_page 2022-07-29 10:03:07 -07:00
Jeff Epler
2e3961019d
Merge pull request #6639 from jepler/repl-ctrl-l
readline: make ctrl-l clear screen & redraw line
2022-07-29 11:42:58 -05:00
Scott Shawcroft
96e870dc77
Merge pull request #6662 from andywarburton/main
Added css support to web workflow
2022-07-29 09:42:13 -07:00
Jeff Epler
975e3e2a08
Merge remote-tracking branch 'origin/main' into repl-ctrl-l 2022-07-28 20:14:17 -05:00
Scott Shawcroft
d6344812e8
Lots of web workflow, C3 and title bar fixes
* Fixes #6221 - C3 hang on `import wifi`. Enabling the WiFi PHY was
  disabling USB. Now boards that use it set CONFIG_ESP_PHY_ENABLE_USB
  explicitly.
* Fixes #6655 - Allows pasting into the web serial page. Fixes reading
  more than 0xf bytes at a time.
* Fixes #6653 - Fixes web socket encoding of payloads >125 bytes. Can
  happen when printing a long string.
* Fixes C3 responsiveness when waiting for key to enter REPL. (It
  now correctly stops sleeping.)
* Disables title bar updates when in raw REPL. Related to #6548.
* Adds version to title bar.
2022-07-28 16:06:56 -07:00
Dan Halbert
cfa7de7592 fix name for macOS mpy-cross universal build 2022-07-28 18:14:32 -04:00
Scott Shawcroft
c4c15206e7
Merge pull request #6608 from tannewt/web_workflow_port
Allow for dynamic reconfigure including port
2022-07-28 12:59:31 -07:00
Scott Shawcroft
35797ff3f0
Remove trailing spaces 2022-07-28 12:52:41 -07:00
Dan Halbert
282f8c49a6
Merge pull request #6660 from tannewt/fix_c3_serial_tx
Improve USB to Serial/JTAG TX
2022-07-28 14:42:56 -04:00
Scott Shawcroft
cb5fa3eaa6
Merge pull request #6664 from dglaude/patch-1
Add board.LED (alias of board.LED_R part of RGB)
2022-07-28 11:26:31 -07:00
Scott Shawcroft
c29fa9012d
Merge pull request #6645 from prplz/seeed_xiao_esp32c3
Add board: seeed_xiao_esp32c3
2022-07-28 11:22:43 -07:00
Scott Shawcroft
0c24190204
Merge pull request #6659 from dhalbert/mpy-cross-mac-macos-11
update mpy-cross macOS build to macos 11; make macos mpy-cross name consistent
2022-07-28 11:20:51 -07:00
Scott Shawcroft
b11eb12da5
Fix modified time. Use snprintf for uint64_t printing. 2022-07-28 11:00:26 -07:00