Тёмный

Arduino Bluetooth Control From Your Mobile Phone Using MIT App Inventor 

Bytes N Bits
Подписаться 33 тыс.
Просмотров 44 тыс.
50% 1

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 88   
@josiahbrunson873
@josiahbrunson873 2 года назад
This is phenomenal. I've watched a ton of videos on communication protocols and your code is by far the easiest to read! Thank you so much!
@BytesNBits
@BytesNBits 2 года назад
Glad it was helpful!
@brunodragas8661
@brunodragas8661 9 месяцев назад
​@@BytesNBitshi, I have a problem, when I open mit app inventor companion and click ,,scan for device", there is nothing there and I connected my phone to bluetooth module as you said. Can you please help?
@brunodragas8661
@brunodragas8661 9 месяцев назад
​@@BytesNBitshi, I managed to overcome this problem where no devices were found, but unfortunately another one came across, when I click on hc 05 it says error 507:unable to connect. Is the device turned on. Any help?
@keithmefferd8728
@keithmefferd8728 9 месяцев назад
I echo the comments below: As a career software developer, this message management is both elegant and very solid, not to mention expertly explained. I'm brand new to Arduino world as well as just starting to think about Android App development so this tutorial was excellent to find. Definitely subscribed!
@BytesNBits
@BytesNBits 9 месяцев назад
Glad you found it useful. Thanks.
@mrmotorvator
@mrmotorvator Год назад
Very good pace, structure and explanation. Will now read about MIT AI with a better knowledge of what is possible and then run through lessons again.
@BytesNBits
@BytesNBits Год назад
Glad you found it useful.
@guvensahin6811
@guvensahin6811 2 года назад
Great video, I solved the coding problem on two or more slider controls. thank you so much
@BytesNBits
@BytesNBits 2 года назад
Glad it helped!
@takudzwamutepfa9952
@takudzwamutepfa9952 10 месяцев назад
You gained a new subscriber 🔥
@BytesNBits
@BytesNBits 10 месяцев назад
Great! Thanks.
@petermccool9396
@petermccool9396 2 года назад
You might want to replicate the way the NEO-6M handles NMEA serial messages and add a checksum to the end of your messages. If you use the same message format, you could use the same code between other serial devices. I'm currently working on a GPS speedometer for my Yamaha Virago but taking a break to work on my smoker. This video has been very educational as I want to use BT to control the temperature of the smoker from my smartphone. I should be able to use my GPS sketch with slight modifications for the BT interface.
@BytesNBits
@BytesNBits 2 года назад
Hi Peter. Those sound like great projects. I'll look into the message format on the next BT project. Thanks.
@bdspvl
@bdspvl 2 года назад
Wow it so happens I just started studying this subject today!
@BytesNBits
@BytesNBits 2 года назад
Great. I hope it helps.
@prashantparkhe6125
@prashantparkhe6125 2 года назад
A complete tut great work 👏 👍 Many Thanks 😊
@BytesNBits
@BytesNBits 2 года назад
You are welcome!
@khaledabd-elhalim1899
@khaledabd-elhalim1899 3 года назад
Thank you so much, this is exactly what I needed😍🥰
@BytesNBits
@BytesNBits 3 года назад
You’re welcome 😊
@jirizamek7875
@jirizamek7875 2 года назад
Very good, thank you very much!
@BytesNBits
@BytesNBits 2 года назад
Glad you liked it!
@rinokentie8653
@rinokentie8653 2 года назад
Very useful! Thanks.
@BytesNBits
@BytesNBits 2 года назад
Glad it was helpful!
@Steinninn
@Steinninn 3 года назад
Pro tip: If you add "0:00 intro" to your description then there will be some handy dandy chapters right in the timeline.
@BytesNBits
@BytesNBits 3 года назад
Thanks for the to. I'll give that a go.
@manfredbogner9799
@manfredbogner9799 5 месяцев назад
Very nice
@BytesNBits
@BytesNBits 5 месяцев назад
Thanks
@Paul_VK3HN
@Paul_VK3HN 5 месяцев назад
This was a very helpful tutorial. Thanks! Question, does the MIT App Inventor app run off-line (without a Cellular connection)? I have a use case in mind which involves being out of cell coverage. It shouldn't need it but you never know with some apps...
@BytesNBits
@BytesNBits 5 месяцев назад
I don't think it needs a connection but I haven't actually tried it.
@petermccool9396
@petermccool9396 2 года назад
I meant to add, for timed interrupts or events, I use the Watchdog timer say set to 250mS. You could count 4 interrupt events for 1S. ,or any combination to suit your project. I have never used millis().
@BytesNBits
@BytesNBits 2 года назад
Hi Peter. Thanks for the tip on using the watchdog timer. I guess both options have their uses.
@venkatyalamati3285
@venkatyalamati3285 Год назад
Thanks for the video sir... Plz make a video on how to store the data received from Arduino (analog read data) to a text file and store the text file in a shared folder like Documents of internal storage... I am trying for this but not successful...
@BytesNBits
@BytesNBits Год назад
Have a look at ai2.appinventor.mit.edu/reference/components/storage.html#File. This component should do what you want.
@venkatyalamati3285
@venkatyalamati3285 Год назад
@@BytesNBits Thank you sir..
@mykeruiz2129
@mykeruiz2129 2 года назад
This video is a great tutorial! I am new to arduino and android app design. I'm trying to get the value of the slider and pass it to arduino as character. I'm using the slider as a speed control to my arduino bluetooth controlled car. When the slider is slide to the right it increases the speed and when it is slide back it decreases the speed. Hoping for a suggestion or idea. Thank you! By the way i like the way you code. You use naming conventions and it is helpful in tracing or tracking the components.
@BytesNBits
@BytesNBits 2 года назад
Hi. The sliders in the video should show you how to get a value passed over Bluetooth. After that it's a matter of using that value to control the motor speed. What sort of motor control are you using?
@edwintjoa6099
@edwintjoa6099 3 года назад
Thanks for the great video!! Always wanted to learn how to create a data protocol. Is there a suggestion on data protocol if there are 2 slave nodes trying to transmit data to 1 master node?
@BytesNBits
@BytesNBits 3 года назад
Hi. I guess the main issue here is working out a way of controlling who has access to the main node. You'll need some sort of polling scheme to allow a slave to request the comms channel. After it's got control of the comms the protocol can be whatever you want.
@keithmefferd8728
@keithmefferd8728 9 месяцев назад
I had written software back in the late 80's that communicated in grocery stores to managed FM-based price checking devices. Multiple terminals communicated with my master app to query a database. Part of the message stream included a 1-character poll ID and a 1-digit message counter 0-9. The master app and each device kept track of which message counter number was expected per Polling device so we could ensure we stayed in sync.
@joanacoronelsoler3977
@joanacoronelsoler3977 Год назад
Thank you so much for the video sir. I would like to also produce 1sec sounds when pressing a button on the screen. Which components do you advise me to get?
@BytesNBits
@BytesNBits Год назад
You've got a choice. The easiest is to use a simple on/off buzzer or tone generator. You simply turn on an output connected to the device and you get a sound, but you can't control what it sounds like. If you want to play sound samples or controllable tones you'll need a speaker which you'll have to drive with a voltage signal from the Arduino. There are a number of ways to this so your best bet is to look for a tutorial. I haven't made one for the Arduino. I hope this helps.
@umutkayacan7659
@umutkayacan7659 3 года назад
Love it!
@BytesNBits
@BytesNBits 3 года назад
Thanks!!
@umutkayacan7659
@umutkayacan7659 3 года назад
@@BytesNBits i feel like im the only one watching your videos and that makes me sad. Some day you will be discovered. Keep it up!
@mimi-mk9eu
@mimi-mk9eu 3 года назад
@@umutkayacan7659 not the only one
@umutkayacan7659
@umutkayacan7659 3 года назад
@@mimi-mk9eu well most of the time im the only one who comments sooo yea
@BytesNBits
@BytesNBits 3 года назад
Hi Guys. I'm just grateful that you're all taking the time to watch them. The channel is growing quite well now so I'll be keeping up with the videos as more people find it. See you in the next one!
@EmCarloJacob
@EmCarloJacob Год назад
This is great! Hope you make other projects like this. I'm trying to modify the app to send a command by using a list picker to make the LEDs blink but it seems that the arduino doesn't recognize or receive the command. I replicated the format of the command by using the same start and end token like this "?e=1;" and print it on the serial monitor but it doesn't even print the "message start". Please help :/
@BytesNBits
@BytesNBits Год назад
Did you manage to get the tutorial code working? If yes then it should just be a matter of decoding your messages correctly in your sketch code.
@EmCarloJacob
@EmCarloJacob Год назад
@@BytesNBits I did. I just copied the code for decoding messages and edited some parts. But the main problem i think is the serial comms. The text message from the app is not printing on the serial monitor. I added a list picker to the app which will send a code "?e=" + selection + ";" but the serial monitor doesn't even print "message start". What do you think is the error? I am new to coding and I am out of ideas.
@BytesNBits
@BytesNBits Год назад
@@EmCarloJacob Can you get the arduino to simply print out everything it receives. Then get the app to send some characters on a button press and your list picker. This should confirm of the list picker is actually sending any characters. If none are being sent have a look at the app documentation on how to use the list pickers. Usually there will be an event or trigger when the list value changes. You'll need to use that to send the message, or use a button press to read the list picker value and send that.
@md.rifatrahmanrafi2771
@md.rifatrahmanrafi2771 6 месяцев назад
Can you please help me with error 507: unable to connect error while connecting the app with my laptop? Thank you..
@BytesNBits
@BytesNBits 6 месяцев назад
I'm not sure what that error means.
@semnal.m2581
@semnal.m2581 6 месяцев назад
Hello and thanks for your effort. In my case this application only works if I have AI Companion open. If I run app alone from my Samsung phone does not work. Can you help? I made only the part with Bluetooth connection and I try to connect to my Bose speaker. Does not work, app does not find anything when I click on Scan for Devices.
@BytesNBits
@BytesNBits 6 месяцев назад
The code in the video works at a very basic level. Various Bluetooth devices identify themselves and their functions and I don't think the Arduino code can recognise all of them, just the basic device type. You should be able to upgrade the code to handle more complex devices but I haven't tried that myself.
@semnal.m2581
@semnal.m2581 5 месяцев назад
@@BytesNBits In order to be able to detect HC05 Bluetooth, after installing the application in the phone, we must navigate in the phone settings and find our application in the Application list. Then tap on our application and then in Permissions we must grant access to nearby devices.
@bettgilbert6923
@bettgilbert6923 2 года назад
an interesting project I would like to give a try... code description, please
@BytesNBits
@BytesNBits 2 года назад
Hi. I tens to have a project page for each video - link in the description. You'll find the code there. bytesnbits.co.uk/arduino-bluetooth-control-mit-app-inventor/
@junaidahmad6753
@junaidahmad6753 Год назад
i used the same method but Bluetooth connection interface is not open
@BytesNBits
@BytesNBits Год назад
Can you connect to the Arduino in the terminal app on your phone?
@dungnguyen-si2sz
@dungnguyen-si2sz 4 месяца назад
i have tried the block "Bluetooth connectivity" but when I connect it through AI2 companion, open Bluetooth on the app and there's only black screen ( I have connected to HC-05 before and tested it on some applications and it worked), can you help me pleaseeee
@BytesNBits
@BytesNBits 4 месяца назад
I'm not sure what that would be. Do you get any screen prompts?
@dungnguyen-si2sz
@dungnguyen-si2sz 4 месяца назад
@@BytesNBits thank you for replying me :)) i solved it, still dont know what the propblem is, but now i can select and connect to HC_05, thank you for clear tutorial, Sir.
@andrewshepherd7429
@andrewshepherd7429 10 месяцев назад
Hello. I am trying to adapt your code from this video for my own purposes. I have noticed in line 46 of the code you present in the video that the daya type 'String' formats in green, whereas the code I downloaded from your website formats the the same thing in black. Does this mean that the IDE version I am using doesn't recognise 'String' as a data type? I am using IDE Version: 2.2.1 on an Apple Mac. Copyright © 2023 Arduino SA
@BytesNBits
@BytesNBits 10 месяцев назад
The String class is just a standard data type in the Arduino system. You shouldn't have any issues with using it. www.arduino.cc/reference/en/language/variables/data-types/stringobject/
@andrewshepherd7429
@andrewshepherd7429 10 месяцев назад
Thanks for the prompt reply. So I am wrong to assume that the text needs to turn green if it is being recognized by Arduino IDE as a reserved word with a specific purpose. I am certainly OK with that. I was just concerned that my later version of Arduino IDE meant something had changed.
@ken9651
@ken9651 Год назад
Hi Bob, We're lookiing to build tool cabnits and would like a locking system using NFC, could you please steer us the right direction.
@BytesNBits
@BytesNBits Год назад
Hi. You can buy NFC readers that use the SPIO channel to talk to the Arduino. This will let you read the id card so you can lock / unlock. e.g. www.ebay.co.uk/itm/354109727290
@mosidalnajjar2782
@mosidalnajjar2782 Год назад
hi, i am trying to make fingerprint system i just can't send sensor data to phone, can you help me please
@BytesNBits
@BytesNBits Год назад
Hi. You basically need to get the Arduino to compile the sensor data into some sort of formatted text stream (usually people use JSON or XML). This gets sent to the phone as in the video and then gets decoded.
@mhamedhamadaembaby2502
@mhamedhamadaembaby2502 3 года назад
Sir ,i try to do an application but i needed more one screen in Bluetooth app. So i do what you do in my first screen . But in other screens the module doest response the ordes .but just from the first one.what is the problem?
@BytesNBits
@BytesNBits 3 года назад
Hi. I'm not sure about that one. I'll have a look and get back to you.
@rahafqnes5525
@rahafqnes5525 Год назад
whats the led called so i can buy it?
@ayosh555sh
@ayosh555sh Год назад
yesss please we would to know its name
@BytesNBits
@BytesNBits Год назад
It's a neopixel strip from Adafruit - www.adafruit.com/product/1426. Most electronics suppliers will sell them.
@renvill1100
@renvill1100 3 года назад
Do you have anything for Adafruit feather? nrf52832 with their 8 channel servo wing controlled by BLE using MIT App???
@BytesNBits
@BytesNBits 3 года назад
Hi Eric. I haven't used the Adafuit device. Usually they use the same libraries as other Arduinos so the communications link should work the same. It's then down to you to create a mini language to describe the servo positions and other data that the app and feather wrong can use to talk to each other. I hope this helps.
@sudhirkoparkar5007
@sudhirkoparkar5007 Год назад
what is error 516 and how to fix it please guide
@BytesNBits
@BytesNBits Год назад
Hi. I have no idea. Try Googling the error code.
@thiensuutv1286
@thiensuutv1286 2 года назад
hi....i want to create on time and off time to on/off led! can you help me!
@BytesNBits
@BytesNBits 2 года назад
Hi. The app on your phone is really an input device to your code on the Arduino. Use some of the selector objects on the app to create a date / time selector and then have that data sent down to the Arduino. Your code will have to interpret this data and then take the appropriate timing actions. Remember the basic Arduino doesn't have access to real world time so you'll need to build that into your code as well.
@thiensuutv1286
@thiensuutv1286 2 года назад
@@BytesNBits Do you have any examples related to this? can i have a reference?
@BytesNBits
@BytesNBits 2 года назад
@@thiensuutv1286 I don't have any examples to show you. The video shows you how to use the app creator tools to create a control and then how to send a message to the arduino. You need to have a look at the other controls in the app maker and then expand upon the message system to send the data you need. Have a look at the documentation on the various controls. Send a time value with the message so the arduino knows what time the message was sent. You can then use one of the in built timer functions to keep track of time from there. Not a very accurate solution but gets you started.
@CrackinWithARB
@CrackinWithARB Год назад
Hello! I commented on your other video where you redirected me to this one. My idea is simple because all the output I have from my phone is a 0 or a 1, so how would I go about making my arduino code? Would it be something simple like: if digitalread(rxPin) == 1: myServo.write(90); else: myServo.write(0) Do you think this should work?
@BytesNBits
@BytesNBits Год назад
Did you want the phone to talk to the Arduino so that you press a button on the phone which tells the Arduino to start the motor? If so you'll need to modify the project in the tutorial to get the button press passed over Bluetooth to the Arduino. Once you've got the signal on the Arduino you can then test the value and do the appropriate action. I hope this helps.
@mrmotorvator
@mrmotorvator Год назад
Very good pace, structure and explanation. Will now read about MIT AI with a better knowledge of what is possible and then run through lessons again.
@BytesNBits
@BytesNBits Год назад
Glad you found it useful.
Далее
HC-05 Bluetooth Module with Arduino-MIT App Inventor
27:57
LoRa - Long-Range Radio for IoT | Arduino, ESP32, RPI Pico
1:07:58
Let's build a DISCORD clone with React Native 🔴
3:42:41
Setting up Bluetooth with  MIT app inventor
16:25
Просмотров 11 тыс.