The blocks area did not load properly. Changes to the blocks for screen 5601220778393600_Screen1 will not be saved

When my screen is load it will automatic Login, isn't successful Login but still log in hehehe

uskiaraPower User

1m

Sorry but I don't understand it well.
Please be aware that if you want to log-in into some web sites, you shall modifiy the way to access (some sites, like google, require a specific agent to login).
Maybe the following post could be of some help (?):

Hi sir
i made it. thank you for helping me

Hi @Unknown_Source,
glad having helped a bit.
Cheers.

1 Like

Good day sir can i have quick question

how can i get the text input to my global variable
image

Dear @Unknown_Source,
thanks to a @Taifun's ( :+1:) extension you can use a TextBox to get input data.
On his web site you'll find the "com.puravidaapps.TaifunTextbox.aix" with plenty of use instructions, samples and hints.
A very basic use could be:


But please refer to his website for further details.
Cheers,

1 Like

you are awesome @uskiara

Hello, Sir @uskiara . I'm experiencing some confusion with my code. I'm attempting to send a numerical data, but when I press the 'Send' button, I'm not receiving it in the Serial Monitor. Could you please assist me in checking my code blocks and the Arduino connection? Your help is greatly appreciated.


Dear @Unknown_Source,
first of all you shall be sure that the communication on BT works.
To do so, send a "fixed" value to your Arduino, instead of sending what is contained into the TextBox1.Text (i.e. send "hello"). Or, even better, on your Arduino, just write a code that echoes on the Serial Monitor whatever is received on the BT : this would help you in finding whether some "unprintable" characters, like Carriage Return (0x0D) or Line Feed (0x0A) are received.
Once you are done with that, you can go on with the debugging, by sending a fixed numerical value, so to test your decoding function in Arduino (i.e. send 34).
Honestly I haven't crawled back the entire post, so I don't remember which Arduino board and which BT shield (HC05, 06, Others ?) are you using. In other words: are you sure that your hardware is correctly configured (for example Tx pin and Rx pin shall be reversed between Arduino board and the shield).
In a nutshell: probably is better to do a step back, and to verify with the simplest AI2 and Arduino codes that the basic comm's works, and than you can add the other functions.
Cheers, Ugo.

PS please don't say "Sir" otherwise I feel too much old ... :grin: :grin: :grin:

Hahahaha okay @uskiara , thank you for being my savior i will try your suggestion.

1 Like

@uskiara i tried last night but i failed :neutral_face:

Hi @Unknown_Source, I'm sad for that, but what have you tried ?
I mean: the BT comm's doesn't work at all ? If so, you have to restart everything from the simplest situation as possible. On Arduino just a pass-thru code (everything arrives from BT, shown on the serial monitor), and sent back to AI2, shown on a label, so to verify a closed loop between AI2 and Arduino.
Until you are not done with that, you can't go on with the rest.
My hint, now, is to refer to @Juan_Antonio web site where you can find a huge quantity of examples. By browsing his "infinite" directory of code snippets, ready made code, on both Arduino and AI2 environments, you'll find 100% the right piece of code for your needs.
Another hypotesis is to split in two your problem: try to connect your Arduino board with a phone where you can run a BT terminal emulator like Serial Bluetooth Terminal (downloadable free from appstore). So you can verify if your Arduino system and code are working fine, before trying to link it to AI2. In this case instead of having two variables (AI2 +Arduino) you have only one : Arduino, since the Serial BT Terminal is surely working.
:crossed_fingers:

1 Like

I don't have problem getting data from Arduino sensor but I can't receive data from my mobile apps i means my connection and HC05 is working. I think my block of sending data form phone has a problem.

OK,
I got it, now. Let me try to resume: data sent from Arduino are joining the AI2 app on your phone, and you can display them on the phone, but you can't get any data from phone on Arduino.
If this is correct, what I can suggest you (I repeat myself, but this is what I would do if I was facing the same situation as yours) to send a fixed data (i.e. "Hello") from AI2 and to display any

This "trivial" code will loop forever in displaying whatever character is received on the BT line, without any data check nor conversion.
Another hint is to use the said Serial Bluetooth Terminal app on a second phone and verify with that app what the "primary" phone is sending using your AI2 app.
Or, instead of using a second phone you can download a free terminal emulator app, for example TeraTerm, that runs on your PC and see what the AI2 app is sending.
The link below is where you can download it

As far as I can see your AI2 app is correct, therefore it's pretty weird that you receive data but you cannot send.

Good morning @uskiara I've been tried all your suggestion still didn't receive from my mobile data.:sweat:

Dear @Unknown_Source , I really don't understand why on your setup something is going wrong.
I've tried on my PC as follows:
This is the layout of Screen1 of a super simple app.

These are the blocks:

image

And this is the Arduino code:

image

Please pay attention that: in my app I don't need to ask for permissions (on my phone, Android 9)
The Arduino board is an ESP32 (because I have such board on my desk, now), and since the ESP32 has a native BT chip on it, I don't need to attach a HC05 or 06.

Everything works fine: that is I see "Hello" on the Arduino Serial Monitor every time I press the SEND button on my phone.

Of course I had to pair the ESP32 board to the phone via BT before using the app.

Still another doubt: do you use a HC05 ? If so, are you sure it's in client mode and not in "master" mode ?
Cheers.

@uskiara after your guidance finally i got it. The only thing i see is about the problem is board normally i used Arduino uno but now i use mega so what i did is to search which pin is usually use in mega and here's the result. Thank you so much :blush::blush::blush:


Dear @Unknown_Source, I'm really happy that you got it!
Probably you said that at the beginning, but I didn't realize that you were using a Mega.
In effect the Mega has 4 hardware serial lines and you can use directly them instead of the SoftwareSerial (which has erratic behaviour over 38400 baud). The use of one of the hardware serial lines (from 0 to 3) allows you to rise the speed up to 115200, which is far better to get data in a fast real time mode. So you can leave Serial0 for the Serial Monitor and use Serial1 (pins 2,3) for the BT connection (throwing away the SoftwareSerial !).
More: in the file "pins_arduino.h" I had to modify the row 74 (or 76 depends on version) used by the library SoftwareSerial.cpp because the compiler was issuing a "warning".
Be aware that on the Mega pins 7,8 don't implement the PWM, therefore the SoftwareSerial won't work on them (another reason to avoid SoftwareSerial :grin:).
Whether you still prefer to use the SoftwareSerial, another hint is to increase the input buffer dimension from 64 to 255 char's. To do so, you have to find the .h file in C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src and modify the value accordingly. Then recompile your Arduino code.
A lot of stuff !!!
Best wishes for your work !
Ciao, Ugo.

EDIT: dear @Unknown_Source would you mind if I make this post "public" so also other developers can get benefit from it ? Thanks.

1 Like

Thank you so and please do so