Now browse the image file you want and set it as ic_launcher it will override the default android icon Right click on the app > new > image asset I also added a spinner to select baud rate and auto scroll feature as available in serial monitorĪdded this string array to strings.xml file located in app > src > main > res > values > strings.xml Open – opens the connection to USB deviceĬlose – closes the connection to USB device I have dragged 3 buttons, 1 edit text, 1 text view on to screen then renamed and placed them in correct order. Manifest file is located in App > src > main > AndroidManifest.xmlīy adding that line we are asking permission of the user every time we connect a USB device to OTG portĮditing should be done in “content_serial_monitor.xml” file Manifest file is like main properties file for our project, It contains permissions details and activity details apk file and install it in your phone to communicate with arduino. In this instructable, I will explain how to create an android app that can communicate with Arduino by USB OTG cable, If you dont care about how to just download. So I decided to make an android app that would send serial data to Arduino to change timings of water motor. So I need a way to change timings without connecting laptop and recompiling Arduino code, that would be complicated for my parents. I haven’t made any user interface for that device to change timings because timings get to change very infrequently. so I made a device to turn on water motor at a fixed timings of day. So I need a portable solution to my problem.Īnother project was, water supply near my place was limited, we get water only at fixed timings. So, to get the correct value I have to data log the photo resistor reading after fixing the light in place, which was a bit harder, because I cannot leave my laptop outside for data logging for a whole day. I have made an Arduino based night lamp using photo resistor and problem with that is light levels was different from place to place, when I am testing I have used a value as a threshold to switch on the light and after fixing it in its final position that value is way off.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |