Pages: 1 ... 4 5 [6] 7   Go Down
Author Topic: Arduino Controller android app  (Read 56966 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

Hola. Creo que mucha gente está intentando hacer trabajos sobre el control y automatización de las viviendas. Por eso también yo voy a poner un enlace de mi proyecto, el cual se os puede remitir una vez registrados. Se trata del control e información del hogar o Domótica...ESO SÍ DOMÓTICA A NIVEL DE USUARIO.
Os dejo el enlace.
http://www.atycocene.com/atycodomo.html

Se trata de un proyecto encauzado a manejar los aparatos eléctricos de tu hogar via Web...
Podéis utilizar usuario:"usuario", contraseña="contraseña" en la versión móvil.

Espero que os guste.
Logged

Mt. Sterling Ky
Offline Offline
Full Member
***
Karma: 5
Posts: 173
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi the string communication is still new to me I understand that the android app is sending a number to the arduino for the digital buttons but what happens after 1-9 have been used when I send 10 I get 1 on the arduino side. I guess the question really is how do you send two digits and the arduino not just take the first?
Logged

Arduino UNO, mega 2560, atmega328, attiny44, LCD, TFT, touch, SD, i2c, spi, MCP23017, android control, automation direct PLCs and drives.

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi the string communication is still new to me I understand that the android app is sending a number to the arduino for the digital buttons but what happens after 1-9 have been used when I send 10 I get 1 on the arduino side. I guess the question really is how do you send two digits and the arduino not just take the first?

I think you are using an old example code. The new code can process longer strings. Try the new code and new example.
Logged


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

Hello marque

When I look up my ip on the internet, I get the ip from my web service, not my home ip. Is there a way to do portfowarding without asking the company to open one of their ports?

Do you know how I'd do to connect in this case? I was able in my intranet, but not from anywhere else
Logged

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

When I look up my ip on the internet, I get the ip from my web service, not my home ip. Is there a way to do portfowarding without asking the company to open one of their ports?

I can't give you the full answer (its tricky) but i can get you started.

Q1) Do you have a static IP for your internet connection? ie. check your internet ip, restart your router, check ip again - is it the same?

If its the same (static IP), good. If its not the same IP (dynamic IP), you have a problem.

If its a dynamic IP, there is a solution though: Does your router support "Dynamic DNS" ? (hopefully yes)

Reply with these answers and then we'll take it from there.

cya
R
Logged

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

its static 177.20.177.232

Though when I open ipconfig, I get 192.168.2.100.




Thanks for the help!

Sufixo DNS específico à conexão:
Descrição: Adaptador de rede Broadcom 802.11n
Endereço Físico: ‎38-59-F9-57-70-57
DHCP Ativado: Sim
Endereço IPv4: 192.168.2.100
Máscara de Sub-rede IPv4: 255.255.255.0
Concessão Obtida: terça-feira, 3 de setembro de 2013 16:54:19
Vencimento da Concessão: domingo, 15 de setembro de 2013 15:22:49
Gateway Padrão IPv4: 192.168.2.1
Servidor DHCP IPv4: 192.168.2.1
Servidor DNS IPv4: 192.168.2.1
Servidor WINS IPv4:
NetBIOS sobre Tcpip Habilitado: Sim
Endereço IPv6 link-local: fe80::9818:9087:876b:c714%14
Gateway Padrão IPv6:
Servidor DNS IPv6:
Logged

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

its static 177.20.177.232

Okay that's good!

Though when I open ipconfig, I get 192.168.2.100.

This is your computer IP. Its not important in this case. What you will need is your Arduino IP (the one you have entered in your android app which works).

Now - I can help you set it up 90% of the way, but can't guarantee it will work - but if you want to give it a shot here's what you need to do.

In your android app, change the server to : 177.20.177.232
In your android app, change the port to : 5566 (this can be any free port, usually higher than 1024 and lower than 65xx?)

On your internet connection modem, go to the port forwarding option.
Forward the incoming port 5566 to the IP : <your current ARDUINO ip> and Port: 80

In theory this should work. Though it gets more complicated depending on your modem/router setup.

Let me know if it works.

cya
R
Logged

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

that would definetly work on my intranet. The problem is that my isp uses NAT I think.
Logged

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

that would definetly work on my intranet. The problem is that my isp uses NAT I think.

Sorry - I'm clueless here. Someone else will have to chip in...
Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

that would definetly work on my intranet. The problem is that my isp uses NAT I think.

To enable port forwarding you need to know, the LAN IP, WAN IP, admin login credentials, brand and type of your router. And the LAN IP of the arduino. Can you post those? (exept for the router login).
Logged


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

Looks nice

Made something similar wit X10 and 433MHz modules , it is on Google Play called X10Domuino
Logged

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

I paid for your pro version as a thank you for your hard work and development, heck would buy you a case of beer  smiley-grin.

This is the first time I am really getting anything to work, and being able to do it wirelessly is even better! It has been a HUGE step forward in what I am trying to do here.

My plans are to hook up my Arduino & Seeeduino Ethernet board to a Wireless Bridge Device so that I can connect my tablet to it in a secure fashion as opposed to an unsecured AdHoc connection. Presently it is hooked up to a spare router that I had laying around here achieving the same function.

Going forward I want to be able to use a Seeeduino Music Shield v1.0 as well on this setup up, and figured to make it easier and less space to be taken up in the Sketch if I could program the App buttons to be told to send the serial strings needed to play certain MP3 files, also stop playing, and turn the volume up & down. I'd love to setup couple of buttons to play completely random MP3 sounds on a timer that I can set the time on (random time 10 - 60 seconds) and then another button to play random sounds on a set timer (such as every 45 seconds).

Is there a way to place more buttons on the screen? 30 is limiting. Maybe swipe left or right to add more button screens?
Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I paid for your pro version as a thank you for your hard work and development, heck would buy you a case of beer  smiley-grin.
Thanks for your support!

Quote
This is the first time I am really getting anything to work, and being able to do it wirelessly is even better! It has been a HUGE step forward in what I am trying to do here.
Good to hear you got it working!

Quote
My plans are to hook up my Arduino & Seeeduino Ethernet board to a Wireless Bridge Device so that I can connect my tablet to it in a secure fashion as opposed to an unsecured AdHoc connection. Presently it is hooked up to a spare router that I had laying around here achieving the same function.
Totally possible, but why setup a second network and not use your home network?

Quote
Going forward I want to be able to use a Seeeduino Music Shield v1.0 as well on this setup up, and figured to make it easier and less space to be taken up in the Sketch if I could program the App buttons to be told to send the serial strings needed to play certain MP3 files, also stop playing, and turn the volume up & down. I'd love to setup couple of buttons to play completely random MP3 sounds on a timer that I can set the time on (random time 10 - 60 seconds) and then another button to play random sounds on a set timer (such as every 45 seconds).
I have no experiance with the Seeeduino Music Shield . If you have an example code i can help you with that. Any way, if can make it with an arduino, you can control it with the arduino controller android app.

Quote
Is there a way to place more buttons on the screen? 30 is limiting. Maybe swipe left or right to add more button screens?
You have 8 profiles in the app. Each with 30 buttons, 3 sliders an two numeric inputs. That should be enough i think. If you really need more let me know. I can make a custom layout if you like, but can't do that for free. You send me a drawing of how you prefer the layout and i build you a custom made arduino controller.

Let me now where i can help you with the project.
Good luck!
« Last Edit: October 08, 2013, 01:31:37 pm by marque » Logged


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

Quote
My plans are to hook up my Arduino & Seeeduino Ethernet board to a Wireless Bridge Device so that I can connect my tablet to it in a secure fashion as opposed to an unsecured AdHoc connection. Presently it is hooked up to a spare router that I had laying around here achieving the same function.
Quote
Totally possible, but why setup a second network and not use your home network?
The reason is that I am trying to implement this for use in a robot. The robot is being driven by a Hobby Class R/C Controller, and the WiFi Serial connection with your App is to activate sounds and lights. I will not be able to have my home network system available when I am out in the field or at a convention. In using that spare router it was an option to possibly take that with me if I needed to and if it was the only way to make a connection. This is not commercial use setup, it is a hobby of mine, and would be happy to point people in your direction going forward once I am completed. My robots will be used in a non-profit manor (charity work) and to make kids smile! smiley

Tonight I had a small spark of an idea that I didn't think about before. I forgot that my Motorola Droid 4 cellphone & Acer A500 tablet both have access points built into their operating system. I can totally toss out the use of a WiFi router to convert my arduino & Ethernet shield into a wireless system if I wanted to.

So I plugged in my Sparkfun RN-XV module into a XBee USB Explorer Board so I can monitor the serial connection.  The same results were obtained when I used the Ethernet shield.

Here are examples of what I see in the serial monitor no matter what buttons I press on the Android app:
Droid 4:
*CLOS**OPEN*GET /?1 HTTP/1.1
Host: 192.168.43.38:2000
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
X-Requested-With: com.marquesoft.ArduinoControllerPro
User-Agent: Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; DROID4 Build/9.8.2O-72_VZW-18) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Accept-Encoding: gzip,deflate
Accept-Language: en-US
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

Acer A500:
*CLOS**OPEN*GET /?1 HTTP/1.1
Host: 192.168.43.85:2000
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; A500 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
Accept-Encoding: gzip,deflate
Accept-Language: en-US
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7
x-wap-profile: http://support.acer.com/UAprofile/Acer_A500_Profile.xml


How do I specify what info needs to be sent when a button is pressed?

Quote
Is there a way to place more buttons on the screen? 30 is limiting. Maybe swipe left or right to add more button screens?
Quote
You have 8 profiles in the app. Each with 30 buttons, 3 sliders an two numeric inputs. That should be enough i think. If you really need more let me know. I can make a custom layout if you like, but can't do that for free. You send me a drawing of how you prefer the layout and i build you a custom made arduino controller.
We can revisit that once things are up and running, thank you for offering to work with me. smiley
Logged

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

Hi Marque

 I still using your app to control my heating but I'm having trouble. The server side of my program doesn't run for very long before stopping. The main part of my program still contuines to run but my devices won't connect to the Arduino Board.

I have attached my code for you to see if there is anything obvious.

Thanks

Richard

* Current_4_4_newcontrols.ino (12.23 KB - downloaded 31 times.)
Logged

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