Home > Uncategorized > Individual Assignment: Advanced Microcontrollers & Wired/Wireless Communications [Wi-Fi signal + LED indicator]

Individual Assignment: Advanced Microcontrollers & Wired/Wireless Communications [Wi-Fi signal + LED indicator]

In this assignment I have decided to work with the following set of post-it notes:

I wanted to make a LED indicator that shows how strong the Wi-Fi signal is by using the CUI32 board and BlinkM LED. The idea is that the BlinkM LED indicates if the Wi-Fi signal is strong or weak by turning into a specific color. Furthermore if there is no Wi-Fi signal at all the BlinkM LED will turn off. The following items describe how the concept works:

  • If Wi-Fi signal is strong the BlinkM LED turns green.
  • If Wi-Fi signal is between strong and weak the BlinkM LED turns blue.
  • If Wi-Fi signal is weak the BlinkM LED turns red.
  • If there is no Wi-Fi signal the BlinkM LED turns off.

Here is the BASIC code:

10 dim i, cmd as byte, r as byte, g as byte, b as byte, z as byte
20 rem -- stop script --
30 let cmd = 'o'
40 while 1 do
50 for i = 0 to 3
60 let cmd = 'c', r = 0x5*(i==2), g = 0x5*(i==0)
70 let cmd = 'c', b = 0x5*(i==1), z = 0x0*(i==3)
80 i2c start 0x9
90 i2c write cmd, r, g, b, z
100 i2c stop
110 sleep 5000 ms
120 next
130 endwhile
end

And lastly here is the concept video:

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment