Basics project 107p Building Login Protected LED Controller app with MIT App Inventor 2


Basics: Project 107p

Project name: Building Login Protected LED Controller app with MIT App Inventor 2

Tags: MIT App Inventor 2, LED, Bluetooth, LED controller protected

Attachments: LEDcontroller sketch, MIT2_LED.png, MIT2_LED1.png, LEDControllerProtected.apk, LEDControllerProtected.aia

In this project, you needed these parts :

1.Arduino Uno R3 1 pc (you can also use the other version of Arduino)

2. Arduino IDE ( you can download it from here  )

3.Jumper cables (F-M, M-M)

4.Breadboard 1pc

5.Bluetooth modules HC-05 or HC-06 1 pc

6.Resistor 3 pcs (1pc 220 Ohm, 1pc 1 KOhm and 1 pc 2KOhm)

7. Smartphone with Android OS

8. LED (red or any color) 1 pc

General

We will learn how to build Login Protected LED Controller app with the MIT App Inventor 2 software. This project is from our new Ebook Building Android Apps for Arduino with MIT App Inventor 2.

This project is a continuation of Basics project 107o Building LED controller app with MIT App Inventor 2 with an additional feature. The LED controller screen is password protected. To control the LED, you must enter a valid username and password. You will learn how to:

  • Add a password and textbox field to your app design
  • Build apps with multiple screens
  • Switch between the app’s screens

Understanding Arduino Uno

You can read more about it here.

Understanding the bluetooth modules HC-05 and HC-06

You can read about them here.

Signals and connections of bluetooth modules HC-05 and HC-06

You can read about them here.

Signals and connections of Arduino Uno

You can read more about it here.

Wiring

LED control
LED control

Step By Step instruction

1.Download the Android app

1. Download LED Controller Protected .apk file ( LEDControllerProtected.apk) to your Android device (smartphone, tablet) and install. Open the LED Controller Protected app. Username – Admin, Password – Pass.

We will explain this project in more details in our new Ebook Building Android Apps for Arduino with MIT App Inventor 2.

2.Uploading the sketch to Arduino Uno

  1. Do wiring.
  2. Install and open Arduino IDE.
  3. Plug your Adruino Uno board into your PC and select the correct board and com port.
  4. Open up Arduino Serial monitor and set your baud to 9600 baud. The HC-05 or HC-6 expects commands to include a carriage return and newline characters (\r\n). You can add these automatically in the serial monitor by selecting “Both NL & CR” at the bottom of the window. You can also enter them manually in the form AT\r\n.
  5. Power off the bluetooth module or remove the RX and TX cables before verifying and uploading the LEDcontroller sketch (attached on the beginning of the project description).
  6. Verify and upload the LEDcontroller sketch to your Adruino Uno board.
  7. Type you Login and Password in LED Controller Protected app. If password and / or login will be not correct you will get the message. If you type correct password and login you will open the Android app.
  8. If you press the LED ON button on your smartphone the LED will turn ON (you will see that the picture of LED in LED Controller Protected app changed too). If you press the LED OFF button on your smartphone the LED will turn OFF (you will see that the picture of LED in LED Controller Protected app changed too).
  9. Congrats!!!You have made it!!
MIT App inventor

Troubleshooting

  • You need to remove the RX and TX cables when you’re uploading the sketch to your Arduino.
  • Sometimes people connect the TX from the bluetooth module to the TX of the Arduino Uno – it’s wrong and won’t work. Make sure you connect it properly, the TX into RX and the RX into the TX.
  • If the HC-05 or HC-06 Bluetooth Module asks for a password -it is 1234.
  • Before testing the “LED Controller Protected” app, test if you’ve made all the connections correctly. How you can do that? Simply enter numbers (‘1′, ‘0′) into your serial monitor and your LED should be turning on and off.

Do you have any questions? Leave a comment down below!

Thanks for reading. If you like this project probably you might like our next ones, so please support us by subscribing our blog and donating.

Summary

We have successfully built the LED Controller Protected app with the MIT App Inventor 2 software.

Project files

Attached on the beginning of this project description

AcoptexCom

Has one comment to “Basics project 107p Building Login Protected LED Controller app with MIT App Inventor 2”

You can leave a reply or Trackback this post.
  1. ปั๊มไลค์ - 2020 June 2 Reply

    Like!! Thank you for publishing this awesome article.

Leave a Reply

Your email address will not be published.