Hello MIT Community i am very new to this and i was just wondering is there a way where i could receive a notification when triggered by bluetooth? I am currently making an arduino project where i use a HC-05 for bluetooth.
Hi,
, welcome to the community.
For posting notifications, you need an extension:
Advanced
If you'd like to have it working in the background, then:
Post your current setup of blocks you have so far, it'll let us help you better.
Hello so currently i have this.
How may i integrate the melon notification? (Also thank you for responding quick that means alot)
- Download the extension (.aix) file from the MelonNotification topic. (Scroll to the very end)
- Import the extension to App Inventor from the left side panel
- Drag a MelonNotification component to the screen
- Use MelonNotification's Build block giving it the title and text (as your BluetoothClient1.ReceiveText block).
- Use MelonNotification's Post block giving it the Id 0 to post the notification.
Okay thank you i will try that.
I'm not very familiar with MIT App inventor yet and is a complete beginner, is it possible for you give me a step by step explanation?
(I'm sorry if I'm asking alot, currently in a rush as I am the only person in my group project who does all the work in this field)
I'm sorry, I have a chemistry exam tomorrow; I'll let others help you.
I see thank you for the help tho, huge help!!!
Please try something yourself and if you got stuck; post a screenshot of your relevant blocks
Taifun
First of all,
is the BT communication working fine between your Arduino system and the app ?
Before any attempt to make something more complex, you'd better have to verify that any data sent from Arduino is correctly received by your app.
First step is therefore to have your HC05 paired with the BT of your phone (or tablet: i.e. your Android device). Then you shall grant both BT and geoloc permissions at Android level.
Furthermore, it is far better that you read the incoming data as text and not as bytes.
To this purpose on your arduino system you shall then send text and not "numbers" ending the last data sent by using a BTserial.println() (while "intermediate" sending shall be done by using only BTserial.print() ). With this method the terminator character in your app shall be set to 0x0a (Linefeed or decimal 10).. If you get lost with that please refer to @ABG' FAQ about BT at the following link:
Last but not least: is your Arduino hardware correctly set ? I mean the Tx and Rx pins between CPU board and the HC05 are they crossed ? On which pins of the CPU board have you connected the HC05 ?
Very last hint (for now) is : to verify the Arduino section, please load on your Android device the ready made app SerialBluetoothTerminal (free on google playstore by Kay Morich) in this way you can forget any problem on Android half and you can focus your attention to the Arduino half.
Very-very-last hint : whenever you need help on a composite AI2 + Arduino environment, please post always both your .aia and your Arduino code ![]()
