Pages: 1 ... 5 6 [7]   Go Down
Author Topic: Using android mobile to control arduino  (Read 91132 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi i found you artical, good stuff, i tried downloading the app inventor source code, but it seems it wont work in app inventor 2, any ideas ?
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just use the previous version. Upload it there and see how it works, you can replicate it in appinventor2 in a few minutes once you understand what's needed.

Also as far as I know Appinventor 2 doesn't have any new features yet and its GUI is almost identical

Here you can access the standard version http://beta.appinventor.mit.edu/
Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 48
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great write-up, thanks for sharing! It is annoying that App Inventor does not offer a conversion tool. I used App Inventor 2 to create  a basic remote for my test robot. Video  and the code are here: http://42bots.com/showcase/arduino-robot-controlled-from-an-android-phone-via-bluetooth/
Logged

Arduino experiments, resources and hacks http://42bots.com

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I work on similar project. I would like controlling lamps by RF emitter via android app/bluetooth.
I have found sketch "HE300 Automatic Protocol Transmitter 'Simulator' " for replace my chacon remote on Homeeasy page:
http://playground.arduino.cc/Code/HomeEasy
The frame is composed of 32 bits (ON / OFF)
it's works great.

Now I would like send frame by android app like you.
In your case, you make pin on high or low but how I can send the chacon frame composed of 32 bits?

Thank you!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Kerimil,
I've tried to load your file, but seems impossible the current App inventor release do not support .zip file format, only suffix .aia format is supported, and the blocks code are not compatible.

do you have please an .aia release

Thanks
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I don't.
My advice ?? open the old file using the old version of app inventor, see what blocks are used and what they do and then replicate it in the new version
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Kerimil! Your project is wonderful but since you look for new ideas how about mixing your circuits and make one program that can control, let's say 9 different lamps, with indicators ON/OFF and when you switch one you can dim it!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi kerimil
how to get LED indikator off or ON Status  to show in android app?
« Last Edit: February 21, 2014, 01:01:33 am by Gazzla » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello my friends. Firstly i want to say thenks for the code because it helped with a handy project.

The problem is that the same code that i use with the arduino duemilanove it doesnt work with attiny 85... the code is very simple.
here is the code for attiny85
Code:
#include <SoftwareSerial.h>//Software Serial Port
#define RxD 1
#define TxD 2

 
SoftwareSerial blueToothSerial(RxD,TxD);

byte serialA;
 
void setup()
{
  blueToothSerial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);

}
 
void loop()
{
  
    if (serialA == 49){int sensorValue = analogRead(A0);
  blueToothSerial.println(sensorValue);
  delay(100);
  serialA = 0;
  
  }


void serialEvent(){
serialA = blueToothSerial.read();
}

when i connect the app is freazing as you see i try to send contineus data from arduino to phone.  Do you think that i must find another way to communicate?
Thanks!

Edit: It seems that the serial with the attiny85 doesn't working properly. I always take chinese characters. I dont know why i burned the bootloader without any errors the blink example is working but the serial no...
« Last Edit: February 25, 2014, 07:19:54 am by Spyrakos88 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It doesn't work for my :/ i have tried with like 5 diffrent apps and codes but none of them worked..
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. Well if you want to control more than one LED just modify the app.
2. If you want a status indicator then you can either implement it within the app without getting any confirmation from the board that the message was received (less complicated) or write a code that sends serial data from the arduino board to the phone when the LED is switched on.

@ spyrakos88
I have no idea why it doesn't work with attiny85, but there is an error in your code (or at least the version that you posted here). Your void loop() is missing a "}" sign. Other than that make sure your tx pin is attached to rx pin on the bluetooth module. What's more make sure the baud rate of your code is the same as the one your bluetooth module is set to. What's more try to get rid of that serialEvent - I don't know if it works with software serial, but I know that it doesn't work with leonardo, micro and esplora. So get rid of it.
« Last Edit: March 20, 2014, 06:30:49 pm by kerimil » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, can you upload the app again please? that link is no longer available, and also MIT App inventor asks for an ".aia" file to open this project.

Can you upload it as well? thanks
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll update it one day but my friend borrowed the bluetooth module for some experimenting so it might take a while.

You can still access the older version of app inventor here -> http://beta.appinventor.mit.edu/
And here are all of my projects -> https://drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing

Just use the older version to see what blocks I used and what they do and rebuild it in the newest version. Or just use the old one
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll update it one day but my friend borrowed the bluetooth module for some experimenting so it might take a while.

You can still access the older version of app inventor here -> http://beta.appinventor.mit.edu/
And here are all of my projects -> https://drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing

Just use the older version to see what blocks I used and what they do and rebuild it in the newest version. Or just use the old one

hi Kerimil, thanks for your work! I do have a question though. I installed in on my Android, but when I ran it, it gave me a RunTime Error of not having Bluetooth Admin permission. Is it not built in?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi friend..

can u show how you use the mit app inventor..
Logged

Pages: 1 ... 5 6 [7]   Go Up
Jump to: