Giter Club home page Giter Club logo

valterfc / digispark_digiusb-softserial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j-rios/digispark_digiusb-softserial

0.0 2.0 0.0 14.61 MB

DigiUSB (V-USB) library modified to allow digispark uses DigiMouse/DigiKeyboard/DigiJoystick with SoftSerial (SoftwareSerial) library at the same time. It provides, for example, to use a Bluetooth module to control the mouse or keyboard.

License: GNU General Public License v3.0

C 81.92% C++ 10.94% Assembly 3.88% PHP 0.70% HTML 0.46% Python 0.03% POV-Ray SDL 0.01% Objective-C 0.06% Processing 1.40% CSS 0.12% Shell 0.01% Elixir 0.01% XSLT 0.02% Makefile 0.33% Batchfile 0.01% GDB 0.11%

digispark_digiusb-softserial's Introduction

Digispark_DigiUSB-SoftSerial

This is a modified DigiUSB (V-USB) library that provides digispark to use DigiMouse/DigiKeyboard/DigiJoystick with SoftSerial (SoftwareSerial) library at same time. It allows, for example, using a Bluetooth module to control the mouse or keyboard.

Also, there is a shield (Eagle files) for the digispark to connect typical bluetooth breakout boards.


If you want a much better solution than this, check this: https://github.com/J-Rios/Digispark_SoftSerial-INT0


How to install:

  • Copy the digistump folder inside .../Arduino-X.X.X/hardware (Overwrite the folder if it exists).

How to use:

  • Connect P2 pin to P3 pin (otherwise you will get: "USB device not recognized").
  • Use the P0 for RX pin and P1 for TX pin of the Software serial library (PWM pins).

Example:

#include <TinyPinChange.h>
#include <SoftSerial.h>
#include <DigiMouse.h>

#define P_RX 0
#define P_TX 1

char a, s, d;
int x, y, c;

SoftSerial BLE(P_RX, P_TX);

void setup()
{
    x = 0;
    y = 0;
    c = 0;
    BLE.begin(9600);
    DigiMouse.begin();
}

void loop()
{
    if(BLE.available() >= 3)
    {
        a = BLE.read();
        s = BLE.read();
        d = BLE.read();
        
        mouse_action(a, s, d); // Determine x, y and c for move the mouse
    }
    DigiMouse.move(x, y, c);
    DigiMouse.update();
}

digispark_digiusb-softserial's People

Contributors

j-rios avatar

Watchers

James Cloos avatar Valter F.C. 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.