Coder Social home page Coder Social logo

apob-100 / freq2hid Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 592 KB

An Arduino sketch for Arduino MKR WiFi 1010 boards to function as a USB keyboard emulator

License: GNU Affero General Public License v3.0

C++ 100.00%
arduino arduino-sketch fft mkr1010 mkrwifi1010 samd21 usb-hid arduino-mkr-wifi-1010

freq2hid's Introduction

Freq2HID - Arduino Frequency-Based Keyboard Emulator

This repository contains an Arduino sketch that enables an Arduino MKR WiFi 1010 board to function as a USB keyboard emulator. The code triggers a keypress (specifically, the space key) when a certain audio frequency (around 500 Hz) is detected above a specified volume threshold. Additionally, it prints the audio volume to the Serial Monitor at regular intervals.

Installation

Arduino Frequency-Based Keyboard Emulator Logo

To use this sketch, you will need:

  • An Arduino MKR WiFi 1010 board
  • A suitable microphone or audio input device
  • The Arduino IDE, available here

Dependencies

This project relies on the following Arduino libraries:

  • Keyboard.h
  • AudioFrequencyMeter.h

These libraries can be installed through the Arduino Library Manager in the Arduino IDE.

Usage

  1. Connect your microphone or audio input device to the A0 pin on your Arduino board.
  2. Connect a pushbutton to the specified button pin (default pin 6) and ground.
  3. Open the Arduino IDE, load the provided sketch, and upload it to your Arduino MKR WiFi 1010.
  4. Open the Serial Monitor to view the audio volume readings.
  5. Press the button connected to pin 6 to toggle the keyboard emulation functionality.

Compatibility

This sketch is primarily designed for the Arduino MKR WiFi 1010 board. However, it should be compatible with other Arduino boards that support USB HID (Human Interface Device) functionality and have analog input capabilities. Some compatible boards include:

  • Arduino Leonardo
  • Arduino Micro
  • Arduino Zero
  • Arduino Due

For other Arduino models, modifications may be needed, especially if they do not natively support USB HID capabilities.

Contributing

Contributions to this project are welcome. To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a pull request.

License

Distributed under the AGPL 3.0 License. See LICENSE for more information.

Acknowledgments

  • This project was inspired by the need for simple, frequency-based input devices for evaluation purposes in scientific research.
  • Thanks to the Arduino community for their invaluable resources and support.

freq2hid's People

Contributors

apob-100 avatar

Watchers

 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.