theuser42
Published © GPL3+

Phone Short Cut Keypad

A mobile keypad with executable file to link a BLE device and computer. This is customize to the end user because of the executable diver.

AdvancedWork in progress10 hours729
Phone Short Cut Keypad

Things used in this project

Hardware components

SparkFun Simblee BLE Breakout - RFD77101
SparkFun Simblee BLE Breakout - RFD77101
This is not actually the device I uses it was a simblee RFD77201 and a RFD22121 that is it.
×1

Software apps and online services

Visual Studio 2015
Microsoft Visual Studio 2015
Arduino IDE
Arduino IDE
RFduino SimbleeForMoble App

Story

Read more

Schematics

Simblee and USB Module

This is all the hardware you need.

Code

The Simblee BLE Code

Arduino
/*
 * Simblee Mobile KeyPad
 * Made by: theuser42
 * Date: 3-29-2018
 * Decription: 
 *    This device uses BLE to connect to Phone to send Serial data
 *    to the computer to its driver to make key presses.
 *    16 buttons when press will send diffent data for each one.
 *    
 */
  
#include <SimbleeForMobile.h>
//configering buttons
uint8_t ui_button0; 
uint8_t ui_button1; 
uint8_t ui_button2; 
uint8_t ui_button3;
uint8_t ui_button4;
uint8_t ui_button5;
uint8_t ui_button6;
uint8_t ui_button7;
uint8_t ui_button8;
uint8_t ui_button9;
uint8_t ui_button10;
uint8_t ui_button11;
uint8_t ui_button12;
uint8_t ui_button13;
uint8_t ui_button14;
uint8_t ui_button15;

void setup() {
  // put your setup code here, to run once:
  SimbleeForMobile.deviceName = "GAME KEYPAD";
 // SimbleeForMobile.advertisementData = "Keypad";
 // SimbleeForMobile.domain = "gamekey.gaming.com";
  // Begin Simblee UI
  Serial.begin(9600);
  SimbleeForMobile.begin();
  
}

/*
 * The traditional Arduino loop method
 * 
 * Enable SimbleeForMobile functionality by calling the process method
 * each time through the loop. This method must be called regularly for
 * functionality to work.
 */
void loop() {
  // put your main code here, to run repeatedly:
  // process must be called in the loop for Simblee UI
  SimbleeForMobile.process();  
}

/*
 * SimbleeForMobile UI callback requesting the user interface (PHONE GUI)
 */
void ui()
{  
  SimbleeForMobile.beginScreen(WHITE);
  SimbleeForMobile.drawText(90,230, "KEYPAD", BLUE, 50);
  ui_button0 = SimbleeForMobile.drawButton(0,300,80,"0");
  ui_button1 = SimbleeForMobile.drawButton(0,350,80,"1");
  ui_button2 = SimbleeForMobile.drawButton(0,400,80,"2");
  ui_button3 = SimbleeForMobile.drawButton(0,450,80,"3");
 
  ui_button4 = SimbleeForMobile.drawButton(83,300,80,"4");
  ui_button5 = SimbleeForMobile.drawButton(83,350,80,"5");
  ui_button6 = SimbleeForMobile.drawButton(83,400,80,"6");
  ui_button7 = SimbleeForMobile.drawButton(83,450,80,"7");
  
  ui_button8 = SimbleeForMobile.drawButton(166,300,80,"8");
  ui_button9 = SimbleeForMobile.drawButton(166,350,80,"9");
  ui_button10 = SimbleeForMobile.drawButton(166,400,80,"10");
  ui_button11 = SimbleeForMobile.drawButton(166,450,80,"11");
   
  ui_button12 = SimbleeForMobile.drawButton(250,300,80,"12");
  ui_button13 = SimbleeForMobile.drawButton(250,350,80,"13");
  ui_button14 = SimbleeForMobile.drawButton(250,400,80,"14");
  ui_button15 = SimbleeForMobile.drawButton(250,450,80,"15");
  
  SimbleeForMobile.setEvents(ui_button0, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button1, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button2, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button3, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button4, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button5, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button6, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button7, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button8, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button9, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button10, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button11, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button12, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button13, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button14, EVENT_PRESS);
  SimbleeForMobile.setEvents(ui_button15, EVENT_PRESS);
 
  SimbleeForMobile.endScreen();
}





/*
 * SimbleeForMobile event callback method
 */
void ui_event(event_t &event)
{
  if (event.id == ui_button0 ){
    if (event.type == EVENT_PRESS){
      Serial.println(0);
    }
  }
    if (event.id == ui_button1 ){
    if (event.type == EVENT_PRESS){
      Serial.println(1);
    }
  }
    if (event.id == ui_button2 ){
    if (event.type == EVENT_PRESS){
      Serial.println(2);
    }
  }
    if (event.id == ui_button3 ){
    if (event.type == EVENT_PRESS){
      Serial.println(3);
    }
  }
    if (event.id == ui_button4 ){
    if (event.type == EVENT_PRESS){
      Serial.println(4);
    }
  }
    if (event.id == ui_button5 ){
    if (event.type == EVENT_PRESS){
      Serial.println(5);
    }
  }
    if (event.id == ui_button6 ){
    if (event.type == EVENT_PRESS){
      Serial.println(6);
    }
  }
    if (event.id == ui_button7 ){
    if (event.type == EVENT_PRESS){
      Serial.println(7);
    }
  }
    if (event.id == ui_button8 ){
    if (event.type == EVENT_PRESS){
      Serial.println(8);
    }
  }
    if (event.id == ui_button9 ){
    if (event.type == EVENT_PRESS){
      Serial.println(9);
    }
  }
    if (event.id == ui_button10 ){
    if (event.type == EVENT_PRESS){
      Serial.println(10);
    }
  }
    if (event.id == ui_button11 ){
    if (event.type == EVENT_PRESS){
      Serial.println(11);
    }
  }  if (event.id == ui_button12 ){
    if (event.type == EVENT_PRESS){
      Serial.println(12);
    }
  }
    if (event.id == ui_button13 ){
    if (event.type == EVENT_PRESS){
      Serial.println(13);
    }
  }
    if (event.id == ui_button14 ){
    if (event.type == EVENT_PRESS){
      Serial.println(14);
    }
  }
    if (event.id == ui_button15 ){
    if (event.type == EVENT_PRESS){
      Serial.println(15);
    }
  }
}

Credits

theuser42

theuser42

5 projects • 5 followers
I have been making for sometime now in the software world with Visual Basic 6.0/.NET. Hardware control is what i found a passion.

Comments