Giter VIP home page Giter VIP logo

pico_w_as_remote_button_and_rotary_encoder's Introduction

Raspberry Pi Pico W as HTTP client: Use of Hardware Buttons and Rotary Encoder

This a Raspberry Pi Pico W CiruitPython code for using the Pico W as a HTTP client in the Photobooth Project of Andreas Blaesius (https://photoboothproject.github.io). You can connect several Buttons or a Rotary Encoder to trigger different actions.

Preparation:

  1. Download the latest adafruit_circuitpython_etc.uf2 file and copy it on the CIRCUITPY drive as described here: https://learn.adafruit.com/pico-w-wifi-with-circuitpython/installing-circuitpython
  2. Create your settings.toml file including your Photobooth´s AP wifi_ssid and wifi_password as described here: https://learn.adafruit.com/pico-w-wifi-with-circuitpython/create-your-settings-toml-file.
  3. Download the latest Adafruit CircuitPython Library Bundle that contains the required CircuitPython libraries for this project. Download the latest 8x.zip file from here: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/
  4. Unzip the zip file and copy the following files from the lib folder to the CIRCUITPY lib folder: adafruit_debouncer.mpy, adafruit_requests.mpy, adafruit_ticks.mpy
  5. Download the code.py file and copy it to the Pico´s CIRCUITPY folder.
  6. Have fun!

Expected behaviour:
Up to 5 buttons can be used which trigger up to 6 different web requests for start-picture, start-collage, start-custom, start-print, start-video and shutdown-now as descirbed in the documentation: https://photoboothproject.github.io/FAQ#can-i-use-hardware-button-to-take-a-picture. There is also LED support for arcarde push buttons, meaning if you use a combined LED button, triggering the button will also light up the LED. Also a rotary encoder is implemented: It triggers web requests for cw (clockwise) and ccw (counter-clockwise). Pressing the encoder´s push button will trigger a web request for rotary-btn-press. Do not forget to define your [Photobooth IP] and [Hardware Button Server Port] below in the code! (Default value for the Hardware Button Server Port is 14711). Button 1 (btn1 on GPIO 10) will do two different actions depending on short or long press: A short press will trigger the web request for the "picture_url", a long press will trigger the web request for the "collage url".

pico_w_as_remote_button_and_rotary_encoder's People

Contributors

frogro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.