mohammad sadegh M

unread,
Dec 20, 2018, 11:16:05 PM12/20/18
to MIT App Inventor Forum
Hi friends. Thank you if my English is not good
The same amount was written by Google Translator
I want to write a program with the appinventor that I can write a remote sensor to the local server or the Internet. Of course, I managed to write the relay control program (which is the area where the information is sent) but I have problems accessing the data. I would love if I can help do.

Chris Ward

unread,
Dec 21, 2018, 3:03:07 AM12/21/18
to MIT App Inventor Forum
Hi Mohammad

To help you, there is a lot of information we need to see.

Since you already have a relay control program (in App Inventor?), sounds like you have made good progress.

Questions about your setup and what we need to see:
  1. A schematic/drawing of the hardware layout
  2. Exact Make/Model of the Relay Board
  3. Are you using a Microprocessor (e.g. Arduino)? If so Exact Make/Model
  4. Exact Make/Model of other hardware (such as a WiFi board)
  5. If using a Microprocessor, we need to see the Script/Sketch
  6. Your App Inventor Project File
You will find a lot of useful links on my website:
https://www.professorcad.co.uk/appinventortips#TipsMicrocontroller  Arduino, other Microcontrollers and Related Subjects

mohammad sadegh M

unread,
Dec 21, 2018, 5:32:28 AM12/21/18
to MIT App Inventor Forum
Hi Chris Part
Thank you for taking the time for me and thank you for your kind help.
The hardware I use is nodemcu or one of the ESP8266 modules, which in some cases is also using Arduino.
And I've added a program that I designed to control the relay with the appinventor
MIT App Inventor.htm

mohammad sadegh M

unread,
Dec 21, 2018, 5:36:45 AM12/21/18
to MIT App Inventor Forum
This is the image of the program I designed
control_relay1.png

Ghica

unread,
Dec 21, 2018, 7:50:36 AM12/21/18
to MIT App Inventor Forum
If you want to post your app inventor app, you have to export it as .aia (click on the projects drop down, choose export project to my computer), and upload that.
The htm file is totally useless.

You need a When Web1.GotText event block and your result will be in the responseContent variable.
If you receive a response that is different from what you thought it should be, then the way to debug this is to open a browser on your PC, and type http://YOUR URL/gpio/0 or http://YOUR URL/gpio/1 and see what happens.
Post your results here if you still have problems.
Cheers, Ghica.

mohammad sadegh M

unread,
Dec 22, 2018, 3:48:00 AM12/22/18
to MIT App Inventor Forum
Hello ghica
Thank you first for your reply.
I've attached the file to you. Of course, this file does not have anything to do with the project I want to design. However, I can relate to it.
What is the block that you have introduced how it works.
Have a small and small project in this area?
Control_led.aia

Ghica

unread,
Dec 22, 2018, 5:27:09 PM12/22/18
to MIT App Inventor Forum
Hi Mohammad,
I just added a label for debugging purposes to your app and the block you asked about.
The label is there to see what the response is from your server.
If it is not what you expect then post the content of the label here.
If everything is ok, then you can make the label invisible, or delete it.

Snap1.png

Cheers, Ghica.
Control_led_1.aia

Juan Antonio

unread,
Dec 25, 2018, 11:13:59 AM12/25/18
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages