Go Down

Topic: Using android mobile to control arduino (Read 103879 times) previous topic - next topic

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 ?

kerimil

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/

StanD

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/
Arduino experiments, resources and hacks http://42bots.com

goodsayan

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!

Tafrata

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

kerimil

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

KOTSOS5

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!

Gazzla

#97
Feb 21, 2014, 05:53 am Last Edit: Feb 21, 2014, 07:01 am by Gazzla Reason: 1
Hi kerimil
how to get LED indikator off or ON Status  to show in android app?

#98
Feb 24, 2014, 07:31 pm Last Edit: Feb 25, 2014, 01:19 pm by Spyrakos88 Reason: 1
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: [Select]

#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...

wacou123

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

kerimil

#100
Mar 21, 2014, 12:21 am Last Edit: Mar 21, 2014, 12:30 am by kerimil Reason: 1
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.

agtzg92

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

kerimil

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


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?

mzh_s

hi friend..

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

Go Up