Show Posts
Pages: 1 ... 10 11 [12] 13 14 ... 27
166  Topics / Device Hacking / Re: This is what we're missing from the Arduino range! on: November 01, 2013, 08:28:55 am
Raise funds through kickstarter.com and create your own company to market the product worldwide
Please rush before somebody steal this great idea   smiley-wink smiley-wink smiley-wink
167  Community / Exhibition / Gallery / Re: Cloud Lamp showing a storm on: November 01, 2013, 08:09:57 am
Nice and original project, thanks for sharing
168  Topics / Science and Measurement / Re: 9 Degree of Freedom on: November 01, 2013, 01:54:18 am
Have a look at Invensense MPU-9150
http://www.ebay.com/itm/9DOF-MPU-9150-3-Axis-Gyroscope-Accelerometer-magnetic-field-replace-MPU-6050-/310670112244?pt=LH_DefaultDomain_0&hash=item485561b5f4
(Gyro+Acc+Mag on a single chip)
169  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: October 29, 2013, 05:05:31 am
Quote
Thank you for sharing this awesome app

Thanks jooheepark,
I appreciate the time you spent for registering and sharing your experience
Matching baud rate is indeed a key point for success (together with RX/TX proper wiring)

@all
please report
 - bugs (if any smiley-wink)
 - requested new features

and...  info's regarding your new Bluetooth RC toy

I personally use this App for controlling my balancing robot, using now the MPU-6050 gyro/acc combo

170  Using Arduino / Networking, Protocols, and Devices / ** Version 3.1 ** on: October 11, 2013, 02:25:54 pm
V 3.1  maintenance version

 - Joystick constraint: box or circle option (as per balaclava07 request)
 - better algorithm for data reception from Arduino
 - various minor fixes

To be uploaded here later today

171  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: September 25, 2013, 01:11:53 am
I just realized that the Arduino sketch is not attached to previous post, sorry guys, here it is
EDIT: You must be logged to see the file  smiley-roll-blue

some functions have been renamed to more meaningfull names

for this demo
 - Button #1:  built in LED control
 - Button #2:  enable Debug mode
 - Button #3:  configured as momentary
 - Button #4:  configured as momentary

EDIT: Please  discard V10.2 and download V10.3 (see reply #129)

172  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: September 13, 2013, 11:46:23 am
With range -100/+100, some joystick positions do interfere with ETX (0x3):

X=59, Y=24  is transmitted as  <2  2  3  1  96  3>
X=47, Y=59  is transmitted as  <2  1  119  2  3  3>

In these two examples, a transmission error is generated as ETX is detected earlier than expected
I have modified the Arduino demo sketch to definitely address this situation

AndroLED V10 is attached to this message
I suggest to use the same decoding algorithm in your own program  

EDIT:
replaced   previousMillis = currentMillis - interval*0.9;  
by            previousMillis = currentMillis - interval*0.5;
to avoid possible racing conditions  

please download again (V10.1)
173  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: September 09, 2013, 08:59:52 am
OK...
This feature will be included, as an option, in V3.1
174  Using Arduino / Networking, Protocols, and Devices / Re: Sending data TO gps on: September 09, 2013, 12:45:32 am
Found the link to the Fastrax NEMA commands, here it is
175  Using Arduino / Networking, Protocols, and Devices / Re: Sending data TO gps on: September 07, 2013, 10:46:27 am
You can talk to your GPS module using NEMA Commands

For my Fastrax UP501 all sentences start with $PMTK
$PMTK251,38400*27<CR><LF>  will set baud rate @38400
$PMTK300,1000,0,0,0,0*1C<CR><LF>   will set fix interval
$PMTK314 ... will select message to be sent (GGL, RMC, GGA...)

Not sure this protocol is valid for your specific GPS module
176  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: September 06, 2013, 01:57:26 pm
Quote
Quote
What about developing the same type of application, but using the android device built in accelerometers
Control would be performed just by tilting the smartphone/tablet.
The joystick would be a "read only" device, reflecting the device inclination.

      This sister application could be called Acc Bluetooth Commander
       Any interest ???

I think that's a great idea.  Or just add an option to the current app to toggle using the accelerometer instead of your finger to control the joystick.

-transfinite

That's another great idea, thanks transfinite
We could call it  "Total BT Commander"   smiley-wink

BTW, any "unexpected behavior" in V3.0 ???
177  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: September 05, 2013, 12:46:45 am
Quote
First I want to thank you for this great app and sharing it for free
Thanks  smiley-wink

Quote
why you don't make joystick ball to turn in circle instead of square like it's now
To get full range at 45°, 135°, 225° and 315°, the joystick moving area HAS to be square.
With a circle, at 45° max values would be 71 (100/1.414) assuming a -100/+100 data range.

Please let me have your phone/tablet model
178  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: August 31, 2013, 03:10:23 am
I got an interesting comment/suggestion
Quote
What about developing the same type of application, but using the android device built in accelerometers
Control would be performed just by tilting the smartphone/tablet.
The joystick would be a "read only" device, reflecting the device inclination.

This sister application could be called Acc Bluetooth Commander
Any interest ???
179  Community / Exhibition / Gallery / Joystick Bluetooth Commander on: August 31, 2013, 02:23:22 am
Joystick Bluetooth Commander turns a smartphone/tablet into a remote controller for any Arduino board
The project is now mature and ready for the Exhibition section



This Android app is available on Google Play

The applications in the robotic field are endless: Home Automation, R/C cars, robotic arms, balancing robots

Two quick examples:
Pan & tilt robot


BlinkM LED control


Please keep all technical discussion in the original thread
180  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: August 28, 2013, 12:16:20 pm
This is the complete Arduino demo sketch for V3.0

Code:
// AndroLED V9

// Arduino test sketch for Joystick BT commander
// V9.0: ** Release for Android BT Commander V3.0 AND HIGHER ONLY **

//  Arduino pin#2 to TX BlueTooth module
//  Arduino pin#3 to RX BlueTooth module

#include "SoftwareSerial.h"

#define    DEBUG        false
#define    STX          0x02
#define    ETX          0x03

SoftwareSerial mySerial(2,3);         // BlueTooth module: pin#2=TX pin#3=RX
int i=0;
byte cmd[6] = {0, 0, 0, 0, 0, 0};     // bytes received
byte buttonStatus = 0;                // first Byte sent to Android device
byte dataByte = 0;                    // second Byte sent to Android device
long previousMillis = 0;              // will store last Buttons status was updated

long interval = 1000;                 // interval to transmit Buttons status (milliseconds)

void setup()  {
  Serial.begin(57600);
  mySerial.begin(57600);              // 57600 = max value for softserial
  Serial.println("AndroLED V9 - demo for Joystick BT commander V3.0");
  delay(300);
}

void loop() {
  if(mySerial.available())  {            // received from smartphone
    delay(5);
    cmd[0] =  mySerial.read();  
    if(DEBUG)  Serial.println(cmd[0]);   // to serial monitor
    if(cmd[0] == STX)  {  
      i=1;      
      while(mySerial.available() && ((cmd[i]=mySerial.read()) != ETX)) {
        if(i>5)  break;
        if(DEBUG)    {Serial.print(i); Serial.print(": "); Serial.println(cmd[i]);}
        i++;
      }
    }
    if(i==2)    setLED(cmd[1]);
    else if(i==5)    setJoystick_Int(cmd);  // 6 Bytes
    else Serial.println("****");
  }  else  {
    unsigned long currentMillis = millis();
    if(currentMillis - previousMillis > interval) {
      dataByte = GetdataByte();
      sendData(buttonStatus, dataByte);
      previousMillis = currentMillis;  
    }
  }
  delay(5);
}

void setLED(int LEDstatus)  {
  switch (LEDstatus) {
    case '1':
      buttonStatus |= B0001;    // Button_1: ON
      Serial.println("Button_1: ON");
      // your code...      
      break;
    case '2':
      buttonStatus &= B1110;    // Button_1: OFF
      Serial.println("Button_1: OFF");
      // your code...      
      break;
    case '3':
      buttonStatus |= B0010;    // Button_2: ON
      Serial.println("Button_2: ON");
      // your code...      
      break;
    case '4':
      buttonStatus &= B1101;    // Button_2: OFF
      Serial.println("Button_2: OFF");
      // your code...      
      break;
    case '5':                    // configured as momentary button
//      buttonStatus |= B0100;     // Button_3: ON
      Serial.println("Button_3: ON");
      // your code...      
      break;
//    case '6':
//      buttonStatus &= B1011;     // Button_3: OFF
//      Serial.println("Button_3: OFF");
//      // your code...      
//      break;
    case '7':                    // configured as momentary button
//      buttonStatus |= B1000;     // Button_4: ON
      Serial.println("Button_4: ON");
      // your code...      
      break;
//    case '8':
//      buttonStatus &= B0111;    // Button_4: OFF
//      Serial.println("Button_4: OFF");
//      // your code...      
//      break;
  }
  sendData(buttonStatus, dataByte);
}

void setJoystick_Int(byte data[5])    {
  // Demo
  int joyX = (data[1]<<7) + data[2];
  int joyY = (data[3]<<7) + data[4];
  joyX = joyX - 200;               // Transmission offset = 110
  joyY = joyY - 200;               // to avoid negative numbers

  Serial.print("Joystick data:  ");
  Serial.print(joyX);  
  Serial.print(", ");  
  Serial.println(joyY);
 
  // Your code here ...
}

byte GetdataByte()  {
  // Demo
  static byte i=0;
  i +=5;
  if(i >100)    i = 0;
  return i;  

  // Your code ...
}

void sendData(byte button, byte data)    {
  mySerial.write(STX); mySerial.write((button<<2)+4); mySerial.write(data+4); mySerial.write(ETX); // +4: avoid 0x2 & 0x3
}

Buttons 1 & 2 are latch buttons
Buttons 3 & 4 are momentary buttons
Pages: 1 ... 10 11 [12] 13 14 ... 27