This is a simple experiment to match the LED location by OpenCV. Each LED of the ‎️‍🌈RGB LED strip has an individual address. You can lit up one by the index of a list; for example, x[3], the 4th LED will be bright. Also, you can control the color by three groups of ‎️‍🌈RGB color codes. At the end of the project, you can use the camera 📷 to pinpoint the location when the LED lit up.

— === Menu === —

🍀1. Install PyCharm & Python
🔧2. Hardware Installation
⚙️3. Software Setup for Hardware
🐍4. Python: Frame Capture

🍀1. Install PyCharm & Python

< ===…

Let’s continue from Part 1. Part two will focus on Bluetooth connection. I promise that you will turn on the LED light asynchronously on Android. Let the fun time begin.

— === Menu === —

🐰1. Update: Fix No Input UI after Disappeared Password Input
. Brothers:Handler & Thread
→ → →
【 ➰ 】 bondThread
→ → → ➰ 】ConnectedThread
→ → → 👨‍💼 Handler
. Step 4:Bonding, Connect Test
. Light up the LED
. Asynchronous Method to Light Up LED
🔄6. Use UUID as Switch

🐰1. Update: Fix No Input UI after Disappeared Password Input

←←← Menu

Some of my friends may found that Bonding Password input will be automatically disappeared after 35 seconds. …

Bluetooth SSP is one kind of Bluetooth Profile. Unlike a headset of other Bluetooth devices, you treat it like a remote USB. It’s popular because you can find this profile on the HC05/HC06 module. We can connect these modules to hardware like Arduino, Raspberry Pi. In this story, I’ll install an HC05 module to control a LED light. It’s a popular experiment online, but I want to do it myself. 🤩: It’s a DIY fun in COVID Period!

— === Menu === —

👷🏼 1. Hardware
🐋 2
. VS Code — C programming
⌨ 3
. C Programming:LED flash
🏢 4
. Android Studio: MVVM and Gradle
🔌 5
. Android Studio: Common files
🎥 6
. Android Studio:User Interface
. Android Studio:Dagger-Hilt
📡 8.
Android Studio:LifecycleObserver← Broadcast Receivers
🏄 9
. Android Studio:MainActivity &. ViewModel
. …

There is a great tool in the Android plugin can help the developers debug phone wirelessly. That is WiFiADB. Please check the marketplace, you’ll find it.

Image for post
Image for post

— === Menu === —

1. Here is the Old Way
📡2. WiFiADB Method

⌨1. Here is the Old Way

In the old way, I have to use CLI or terminal to solve the technique.

Open a terminal or CLI:

🏄WordPress is quite easy to use Web editing tool. It combines PHP and MySQL database. So WordPress is a powerful tool, too. You can add users, leave a post, chat in the blog, send an email, and deal with E-commerce data. Local by Flywheel helps us to install all necessary software for WordPress automatically. We can develop multiple WordPress sites locally: test+preview.

— ==== MenU ==== —

🔌1. Install Local by Flywheel
⚡️2. Create a WordPress site
🍟3. Site Configuration
🍬4. Advanced Features for Local
👬5. Site: Clone, Export, Blueprint, and CLI

🔌1. Install Local by Flywheel

< === Menu

Find the Download button and download. …

Adding a different language to an App is easy on Android. The Locale function can support Android to switch to different languages. By SharedPreference storage, we can save the language setting into internal memory. Combine these two, we can have a multilingual App.

Image for post
Image for post

After the configuration update, we can swap the hardcoded strings of strings.xml under the corresponding language.

— === Menu === —

👾1. Add Language Resource
. UI Design
. Translation Editor
. Inject Storage in ViewModel
. Common Helpers
. UI for Switching Locale
. Final Result

👾1. Add Language Resource

< === Menu

Let’s open a new project. After you’re done, we can add a new resource. …

In Windows 10, I’ve prepared two USB sticks: 32GB and 256GB from SanDisk to help me install a Hackintosh. Follow my steps, you don’t need to touch your local drive. When you’re done, you just need to insert your USB to show off to boot into OSX.

Never partition your harddrive just for experiment! In fact, you can't merge them back. The only thing you can do to: Copy all the data to the a second drive and format the old one.

The large USB has a faster speed, 300MB/s. If you don’t want to use a USB stick, you can replace 256GB with an M.2 SSD ($39) with a $25 external USB 3.1 NVME case. You can have more even faster speed from 300MB/s (SanDisk Extreme Pro) up to at least 1GB/s. That’s good news for us. If you don’t feel some extra installation is hard labor, I suggest that you grab an M.2 SSD. A high speed and huge storages are never enough for someone who is shooting with 4K and 8K video hardware. …

Image for post
Image for post

If you want to transfer your Windows PC into Hackintosh by OpenCore, you’d better unlock your BIOS. The OSX like Big Sur needs to use register #2.

— === M E N U === —

🔬1. Test BIOS Locking Status
Download the Shell
Test Tool
Test BIOS Lock
. Find CFG Lock Address
BIOS Tool: Ru.efi
Viewer+Converter of BIOS Image
Find the Address of CFG Lock
. Unlock CFG

🔬1. Test BIOS Locking Status

< === Menu

  • A bootable disk formatted by Fat32. Don’t waste your time to create a new one. Your OpenCore bootable USB stick is fine.

Boot folder: /efi/boot

So we need to collect all of the files in this folder. My OpenCore…

If you were using Android Studio, you knew it has a boring button effect (Google: 😨). When you run an app, you’ll see the button has no effect at all. “Click”, nothing shows up. And 😱you tap for tens of times after and you ask yourself whether the button isn’t working. 🤬You may ask for the relatives of the programmer. You know what I mean. So the button effect is important for a popular app. It’s easy to code:

  • MotionEvent.ACTION_UP: → Do sth.
  • MotionEvent.ACTION_DOWN: →Do sth.

You can even save the code to input the onClickListener☺🙂☺👍.

— — === MenU === — —

👨‍💻1. How to create an Animation folder
. XML Effect: scale_up &. scale-down
. Implement Effect — View.OnTouchListener
. Use Effects in the Activity
. Test Result

👨‍💻1. How to create an Animation folder

< === Menu

Image for post
Image for post

Right-click “res” → “New” → “Android Resource…

In part 2, I’ll get in touch with Bluetooth On/Off switch on the Android phone. For the most part of the story, I focus on Client-Server communication. I will use more commonly with the function ejection. The task is simple: Register a customer and send he/she an email response, like this:

Image for post
Image for post
  • The customer needs to enter the product ID to download its operational code in the app.
  • The server searches product ID and returns one if it is found.
  • The customer fills out the registration form and sends it to the server. …


Homan Huang

Computer Science BS from SFSU. I studied and worked on Android system since 2017. If you are interesting in my past works, please go to my LinkedIn.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store