Giter Site home page Giter Site logo

stempedia / dabble Goto Github PK

View Code? Open in Web Editor NEW
39.0 9.0 17.0 205 KB

Arduino Library for Dabble app, which includes virtual shields for robot control, sensors, camera, IoT and much more. Compatible with Bluetooth modules like HC-05, HC-06, HM-10, and ESP32 (BLE or Bluetooth 2.0 or 4.0)

Home Page: https://thestempedia.com/product/dabble/

License: GNU Lesser General Public License v3.0

C++ 94.55% C 5.45%

dabble's Introduction

Dabble- One App for Sensing & Control

Whether you’re a student, a teacher, or a hobbyist, Dabble is the perfect place for all your DIYing needs. It transforms your Smartphone into a virtual I/O device and lets you control hardware via Bluetooth, communicate with it, access sensors like accelerometer, GPS, proximity and other features of your Smartphone. It also provides you with dedicated projects compatible with Scratch and Arduino to help you learn by doing. Currently Dabble is avaiable for Android users(coming soon for iPhone users) and its is supported on Android version 5.0.0 and above. One can download the app from Google PlayStore with this link given below: Android: https://play.google.com/store/apps/details?id=io.dabbleapp iOS: https://apps.apple.com/us/app/dabble-bluetooth-controller/id1472734455

The app is designed to provide data of certain features of your smartphone to evive and microcontroller boards like Arduino Uno, Nano and Mega,it also allows you to control them by your Smartphone. The app communicates with these boards via bluetooth modules like HC-05, HC-06 and HM-10. This repository consists of library required on your board side for communication with app. Dabble consists of various modules that allows you to control your hardware and access various smartphone features. A brief description of each module is mentioned below:

  1. Led Brightness Control: This module allows you to control digital pin of your hardware through mobile. You can make pins HIGH or LOW, can also change its PWM if PWM functionailty is supported on that pin. You can use this module to control LED brightness and carry other such activities.
  2. Terminal: Send and receive text and voice commands over Bluetooth between your hardware and smartphone.
  3. Gamepad: Control devices in analog (Joystick), digital, and accelerometer mode.
  4. Pin State Monitor: Remotely monitor the live status of devices and debug them.
  5. Motor Control: Control actuators such as the DC motor and servo motor.
  6. Inputs: Provide analog and digital inputs via buttons, knobs, and switches.
  7. Camera: Use the camera of your Smartphone for taking photos and videos, face recognition and colour picking.
  8. Phone Sensor: Access different sensors of your Smartphone such as the accelerometer, gyroscope, proximity sensor,magnetometer, light meter, sound meter, GPS, temperature sensor, and barometer to make projects and conduct experiments.
  9. Oscilloscope: Visualise and analyse the input and output signals given to the device using the oscilloscope module.
  10. IoT: Currently consist of Data Logger,Notification and Internet module. However the Internet module is still under development.
  11. Music: Receive commands from the device and play tones, songs, or other recorded files on your Smartphone.
  12. Projects (Coming Soon): Make dedicated projects to experience different concepts of the real world first-hand.

Dabble Library

As per the module set present in Dabble app the library is also structured in same way. Currently this library is supported on evive and boards like Arduino Uno, Mega and Nano. It consists of certain examples codes which will help you in getting started with various Dabble modules. To explore more about Dabble, goto [https://thestempedia.com/docs/dabble/getting-started-with-dabble/]

dabble's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dabble's Issues

ARDUINO IDE ERROR WHILE IMPORTING Dabble.h

I get the following error trace while importing the Dabble.h header file
CODE:

`#include<Dabble.h>

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}`

The error tree i get is :

`
C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\GamePadModule.cpp:5:0: warning: "PI" redefined

#define PI 3.14159

^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:53:0,

             from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\GamePadModule.cpp:3:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:47:0: note: this is the location of the previous definition

#define PI 3.1415926535897932384626433832795

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void SMSModule::sendMessage(String, String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:23:94: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(SMS_ID,0,SENDCONTENT,1,new FunctionArg(content.length(),&content[0]));

                                                                                          ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void NotificationModule::setTitle(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:34:107: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(NOTIFICATION_ID,0,CREATE_NOTIFICATION, 1, new FunctionArg(title.length(),&title[0]));

                                                                                                       ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp: In member function 'void NotificationModule::notifyPhone(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:40:111: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(NOTIFICATION_ID,0,UPDATE_NOTIFICATION, 1, new FunctionArg(content.length(),&content[0]));

                                                                                                           ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\NotifyAndSMSModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::createFile(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:17:98: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(DATALOGGER_ID,0,FILENAME,1,new FunctionArg(FileName.length(),&FileName[0]));

                                                                                              ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::createColumn(String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:52:137: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

 Dabble.sendModuleFrame(DATALOGGER_ID,0,COLUMNNAME,2,new FunctionArg(1,&a),new FunctionArg(sendColumnName.length(),&sendColumnName[0]));

                                                                                                                                     ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp: In member function 'void DataLoggerModule::send(String, String)':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:117:127: warning: invalid conversion from 'char*' to 'byte* {aka unsigned char*}' [-fpermissive]

Dabble.sendModuleFrame(DATALOGGER_ID,0,DATATYPE_CHAR,2,new FunctionArg(1,&columnFlag),new FunctionArg(data.length(),&data[0]));

                                                                                                                           ^

In file included from C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\DataLoggerModule.cpp:2:0:

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.h:106:2: note: initializing argument 2 of 'FunctionArg::FunctionArg(int, byte*, bool)'

FunctionArg(int l ,byte * d, bool _saveData=false)

^

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.cpp: In member function 'getArgumentData':

C:\Users\hp\Documents\Arduino\libraries\Dabble-master\src\Dabble.cpp:349:1: internal compiler error: Segmentation fault

}

^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.`

Screenshot (2)

Errors while compiling using ArduinoIDE

I did as the instructions specified.

But there were several issues :

  1. The zipped file name was invalid and should not have had any '-' or '.' or names beginning with numbers.
  2. The file names inside had similar problems
  3. I had to manually change file names to fix this. I did not change the names of any files inside the "src" folder, only the "examples" folder as that is where the problems were arising.
  • Screenshot from 2019-09-13 00-51-26
  • Screenshot from 2019-09-13 00-51-31
  • Screenshot from 2019-09-13 00-51-38
  • Screenshot from 2019-09-13 00-51-40
  • Screenshot from 2019-09-13 00-51-44
  • Screenshot from 2019-09-13 00-51-46
  • Screenshot from 2019-09-13 00-51-54

Leaving all the files where they were, I got the following error

Screenshot from 2019-09-13 00-58-46

To fix that I moved all the header and cpp files to the folder of my sketch and then the Dabble.h missing error was gone because it was right there but then I ended up getting several other errors a screenshot of which I have attached.

These errors were triggered by #include<Dabble.h>

Screenshot from 2019-09-13 00-44-45

I use a LinuxOS (Debian 9 Stretch to be specific).

I am really hoping to find a fix for this as soon as possible as I am working on a college related project.

Thankyou.

No detection of interrupted BT connection

Whenever BT connection is lost, Dabble (on esp32) keeps collecting old data without recognizing. Is there a timestamp, or any function or flag that we can use to prevent this behaviour? Example: using the gamepad, y = 7 fullspeed, connection lost, vehicle keeps driving at full speed. Hazardous!

Dabble not compatible with Arduino Nano Every (MegaAVR)

It looks like Dabble isn't compatible with the megaavr architecture:

In file included from C:\Users\jens\Documents\Arduino\libraries\Dabble-master\src/DabblePrintln.h:4:0,
                 from C:\Users\jens\Documents\Arduino\libraries\Dabble-master\src/TerminalModule.h:6,
                 from C:\Users\jens\Documents\Arduino\libraries\Dabble-master\src/ModuleIncludes.h:4,
                 from C:\Users\jens\Documents\Arduino\libraries\Dabble-master\src/Dabble.h:56,
                 from C:\Users\jens\Documents\Arduino\libraries\Dabble-master\examples\02. Uno Nano Mega\03.Gamepad\03.Gamepad.ino:11:
C:\Users\jens\Documents\Arduino\libraries\Dabble-master\src/DabblePrint.h:34:19: error: 'PrintClass PinStatus' redeclared as different kind of symbol
 extern PrintClass PinStatus;
                   ^~~~~~~~~
In file included from C:\Users\jens\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/Interrupts.h:8:0,
                 from C:\Users\jens\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/ArduinoAPI.h:29,
                 from C:\Users\jens\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/Arduino.h:23,
                 from sketch\03.Gamepad.ino.cpp:1:
C:\Users\jens\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/Common.h:16:3: note: previous declaration 'typedef enum PinStatus PinStatus'
 } PinStatus;
   ^~~~~~~~~
exit status 1
Error compiling for board Arduino Nano Every.

Arduino: 1.8.13
Dabble: 1.5.2
Board: Arduino Nano Every

Possibly related: arduino/ArduinoCore-API#25

I have looked at the code but can't really figure out how to fix this. And if this is the only problem or if more problems will turn up when this problem is fixed.

Dabble iOS App is using a slightly different BLE protocol than the Dabble Android App

While trying to use the Dabble App for our educational robots, we discovered that the Android App did communicate with the robot but the iOS App did not. Further investigations showed that the iOS is using a slightly different BLE protocol than the Android App). The iOS App uses a wrong BLE characteristics for writing (which is intended for receiving) . Is this intended? :-) This difference can make working with the Dabble App and different BLE devices tricky :-) (some combinations will work, some not...) ... (maybe you can pass on this info to the Dabble iOS App developer)

Here you can see the details:
google/bumble#479

Gamepad/Joystick implementation

Hi,

I looked for a forum to bring this up for discussion, but I didn't find one so here goes:

I find the Joystick in the Gamepad Module a bit strange. Or at least the getXaxisData() and getYaxisData() functions. If I move the joystick forward I get values up to 7. This is OK. If I move it backwards I only get -6, not -7 as the documentation states. I guess this is a bug somewhere, but I can work around this. Left and right works as expected.

Now for the tricky part. The joystick is round! This works for the angle-radius functions, but is pretty useless for the Xaxis/Yaxis input since you cannot get full forward at the same time as full right. The only way to get max forward is to keep the joystick dead center. This is not how a joystick usually works, where you can move the joystick to up right corner and get both Y=7 and X=7. The joystick (or control stick on a RC controller) is square.

So my wish is for the app to have a fourth mode, besides "Digital Mode", "Joystick Mode" and "Accelerometer Mode" with a square joystick.

As I didn't find a forum to discuss this in, I don't know if this is the intended behavior. I does make perfect sense for the getAngle() and getRadius() functions I guess. If this indeed the way it is supposed to work you can close this issue immediately. :-)

Error in new version of library 1.4.0

Compiling gives this error:
OscilloscopeModule.cpp: In constructor 'OscilloscopeModule::OscilloscopeModule()': OscilloscopeModule.cpp:7:55: error: 'OSCILLOSCOPE_ID' was not declared in this scope OscilloscopeModule::OscilloscopeModule():ModuleParent(OSCILLOSCOPE_ID)

I reverted to version 1.3.0 which has no problems.

Problème entre I2C et Dabble ?

Bonjour,
J'ai un programme de test d'un écran OLED connecté en I2C qui affiche un message.
Dès que j'introduit "#include <Dabble.h>" dans ce programme, l'écran ne fonctionne plus !
Dès que je supprime, le programme refonctionne.
Quelqu'un a t'il une explication ? et éventuellement une solution ?

#include <Adafruit_SH110X.h>
Adafruit_SH1106G display = Adafruit_SH1106G(128,64, &Wire, -1);
#include <Dabble.h>
void setup() {
Serial.begin(9600);
delay(250); // wait for the OLED to power up
display.begin(0x3c, true); // Address 0x3C default
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SH110X_WHITE);
display.setCursor(0, 0);
display.println("Bonjour Rol");
display.display();
}
void loop() {}

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.