• This repository has been archived on 19/Jul/2021
  • Stars
    star
    142
  • Rank 250,344 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ESP32-CAM webcam with MicroPython

Webcam with ESP32-CAM and MicroPython

Imgur

See http://micropython.org/ for more information on MicroPython.

See https://github.com/tsaarni/micropython-with-esp32-cam/wiki for instructions on how to build custom version of MicroPython for ESP32 with OV2640 camera support.

MicroPython logo is by MicroPython project https://github.com/micropython/micropython/tree/master/logo.

Installation

Install tools on development machine

virtualenv -p python3 venv
. venv/bin/activate
pip install esptool adafruit-ampy pyserial

Install webcam

export AMPY_PORT=/dev/ttyUSB0
ampy put boot.py
ampy put webcam.py

Connect UART to esp32 and start terminal console

miniterm.py /dev/ttyUSB0 115200 --dtr 0   # normal mode

Install dependencies on esp32 by running following on console

import upip
upip.install('picoweb')  # tested with 1.5.2
upip.install('micropython-ulogging')
upip.install('ujson')

Known problems

uasyncio throws exception

Following exception is thrown by uasyncio

Running on http://0.0.0.0:80/
INFO:picoweb:642.000 <HTTPRequest object at 3f819b90> <StreamWriter <socket>> "GET /"
Traceback (most recent call last):\r\n  File "<stdin>", line 25, in <module>
File "/lib/picoweb/__init__.py", line 298, in run
File "/lib/uasyncio/core.py", line 161, in run_forever
File "/lib/uasyncio/core.py", line 136, in run_forever
File "/lib/uasyncio/__init__.py", line 60, in remove_writer
TypeError: function takes 2 positional arguments but 3 were given

workaround is to modify lib/uasyncio/init.py on the target

--- lib/uasyncio/__init__.py.orig       2019-02-17 19:13:41.207015002 +0200
+++ lib/uasyncio/__init__.py    2019-02-17 19:12:33.895297196 +0200
@@ -57,7 +57,7 @@
         # and if that succeeds, yield IOWrite may never be called
         # for that socket, and it will never be added to poller. So,
         # ignore such error.
-        self.poller.unregister(sock, False)
+        self.poller.unregister(sock)

     def wait(self, delay):
         if DEBUG and __debug__:

More Repositories

1

android-native-egl-example

Sample that shows how to combine native rendering with Java UI on Android
C++
209
star
2

docker-deb-builder

Tutorial on how to use Docker to build Debian packages
Shell
98
star
3

cpp-subprocess

popen() -like C++ library with iostream support for stdio forwarding
M4
79
star
4

avr-high-voltage-serial-programming

AVR high-voltage (HV) serial programming for ATtiny
C++
37
star
5

k8s-external-mdns

Expose Kubernetes services with mDNS
Dockerfile
24
star
6

docker-ejbca

Run EJBCA server in Docker container
Groff
19
star
7

certyaml

Declarative way to create x509 certificates for test environments.
Go
11
star
8

mqtt-micropython-smartsocket

Alternative firmware for Itead S20 WiFi Smart Socket
Python
4
star
9

devenvs

Java
3
star
10

ssh-subprocess

Python module that provides subprocess-like execution of commands over SSH
Python
3
star
11

x500dn

Convert string with X.500 distinguished name into pkix.Name.
Go
2
star
12

logstash-lumberjack-demo

Dockerfile
2
star
13

ir-remote-control-repeater

DYI IR remote control signal extender
C++
2
star
14

stm32f103-low-power-mbed

How to enable standby mode on STM32F1
C++
2
star
15

mcu-playground

Repository for some random experiments
C
1
star
16

tls-testapp

C
1
star
17

kubernetes-tcp-retransmit-retry-timeout

Go
1
star
18

docker-image-creator

Tool which creates CentOS / Fedora / Red Hat -style Docker base images using Docker itself
Shell
1
star
19

stm32f103-minimal-template

Project template for barebones STM32F103C8
C++
1
star
20

vagrant-box-index

CGI script that creates index from Vagrant box metadata files
Python
1
star
21

esp32-pictureframe

C
1
star
22

java-certy

Java library for generating certificates for unit and integration tests.
Java
1
star
23

dyndns-function

Dynamically update Google Cloud DNS with given hostname and IP address
Go
1
star
24

vagrant-kubernetes

Run minimal Kubernetes cluster in Vagrant box
Shell
1
star
25

stm32f030-minimal-template

Project template for barebones STM32F030F4
C
1
star
26

cloud-playground

Repository for some random experiments
Shell
1
star