2017年6月9日 星期五

Bluetooth Remote Camera: Privacy Policy

Privacy Policy

Let's refer to "Bluetooth Remote Camera" as "the app".

  • This app is used to take a quick remote shot or video recording with your friends or family. Do not use in other applications, for example, as rear view camera in your car because bluetooth video streaming is very slow and cannot give you an immediate preview. It is your responsibility to avoid such use.
  • The app does not collect the personal data and any sensitive information. I respect your privacy!
  • The app asks for camera permission in order to use the camera to take photos and record videos.
  • The app asks for record audio permission in order to record audio when recording videos.
  • The app asks for location permission is to allow users to geotag their photos, but this is optional and disabled by default. If enabled, the geotag information (your device location) is embedded in the photos' metadata. Location permission is also required for Bluetooth scan if the Android version is 6.0 or higher. I do not collect your location.
  • The app asks for storage permission in order to save the photos you take. The photos you take are saved by default in /DCIM/camera.
  • The app requires internet permission so that it can request advertisements through a net connection.

Last updated: 2018/11/04.

2017年5月20日 星期六

8051 - Bluetooth Toy Car (繁)

警告與免責聲明:

如果您沒有任何基本電子知識,請不要嘗試這篇教學。作者對本教學所導致的任何損害概不負責。嘗試這篇教學風險自負。

底下將使用一顆STC89C52RC單晶片、一個HC-06 UART介面藍牙模組與一個L298N馬達驅動模組來打造一台藍牙遙控玩具車。此遙控車要搭配『Bluetooth Remote Toy』APP才能使用,如此一來,你就可以透過手機藍牙來控制玩具車。底下是遙控車的控制指令:

每個命令都是由一個Byte組成。如果您要停止某個動作,則在該動作指令和停止/關閉指令之間執行OR操作。例如,

  • 0x01000100(前進)| 0x00100000(停止)= 0x01100100,將發送到遙控車使它停止前進。
  • 0x01001000(大燈) | 0x00100000(關掉) = 0x01101000,將發送到遙控車使它關掉大燈。

紅色、綠色和藍色按鈕保留給那些想要執行額外操作的人。

控制功能 指令
紅色按鈕 0x01000001
綠色按鈕 0x01000010
藍色按鈕 0x01000011
前進 0x01000100
後退 0x01000101
右轉 0x01000110
左轉 0x01000111
大燈 0x01001000
尾燈 0x01001001
停止/關掉 0x00100000

8051 - Bluetooth Toy Car (English)

Warning and disclaimer:

If you don't have any basic electronics knowledge, please don't try this one. The author takes no responsibility for any damages caused as a result of this tutorial. Try this one at your own risk.

I am going to use a STC89C52RC microcontroller, a HC-06 UART interface Bluetooth module and a L298N motor driver module to biuld a Bluetooth remote control toy car. The toy car is controlled by Bluetooth Remote Toy, which is an android based application developed by me and can be downloaded form Google play store, so you can remotely control toy car via Bluetooth by your android phone. The toy car commands are as follows.

Every command consists one byte. If you stop a certain action, an OR operation will be performed between that action command and the Stop/Off command. For example,

  • 0x01000100(Forward) | 0x00100000(Stop) = 0x01100100, which will be sent to the toy car and make it stop forward.
  • 0x01001000(Front light) | 0x00100000(Off) = 0x01101000, which will be sent to the toy car and make it turn off the front light.

The red, green and blue buttons are reserved for those who want to do extra actions.

Control Function 1-byte Command
Red button 0x01000001
Green button 0x01000010
Blue button 0x01000011
Forward 0x01000100
Backward 0x01000101
Right 0x01000110
Left 0x01000111
Front light 0x01001000
Rear light 0x01001001
Stop/Off 0x00100000

2017年5月19日 星期五

8051 - Bluetooth Remote Shutter (繁)

警告與免責聲明:

如果您沒有任何基本電子知識,請不要嘗試這篇教學。作者對本教學所導致的任何損害概不負責。嘗試這篇教學風險自負。

底下將使用一顆STC89C52RC單晶片搭配一個HC-06 UART介面藍牙模組來打造一個藍牙遠端快門(Remote Shutter)。遠端快門要搭配Bluetooth Remote Toy APP才能使用,此APP是我開發,你可以到Google play store下載。

當APP連線到遠端快門,APP會傳送識別指令'W'給遠端快門。當遠端快門收到這個指令,它必須回它的ID 'I'給APP。否則APP會認為遠端裝置是這個應用程式的相機快門,而不是你自己DIY的遠端快門。針對相機快門與遠端快門,相機的初始化是不一樣。電路圖如下,當按下Z0 Snap按鍵時,會傳送一個byte的'T'字元給APP,此時綠色的LED燈會開始閃爍。APP收到'T'字元後,會進行拍照,等拍照完成後,APP會回一個byte的'D'字元給遠端快門。如果遠端快門收到'D'字元,LED燈就會停止閃爍。如果遠端快門沒有收到'D'字元,等10秒timeout掉就會停止閃爍。當按下Z1 Flash mode按鍵時,會傳送一個byte的'M'字元給APP。APP收到'M'字元後,會切換到下一個Falsh mode。你也可以考慮使用其它單晶片開發,像Arduino等等。

電路圖

在電路圖上有兩個按鍵,分別是Snap按鍵與Flash mode按鍵,還有一顆LED燈用來指示拍照。一個HC-06藍牙模組用來傳送指令給Android手機與接收手機的的指令。一顆STC89C52RC單晶片用來控制整個系統。

8051 - Bluetooth Remote Shutter (English)

Warning and disclaimer:

If you don't have any basic electronics knowledge, please don't try this one. The author takes no responsibility for any damages caused as a result of this tutorial. Try this one at your own risk.

I am going to use a STC89C52RC microcontroller with a HC-06 UART interface Bluetooth module to create a Bluetooth remote shutter. The remote shutter is intended for use with Bluetooth Remote Toy, which is an android based application developed by me and can be downloaded form Google play store.

When the app is connected to the remote shutter, it will send the identification command 'W' to the remote shutter. When the remote shutter receives this command, it must return its ID 'I' to the app. Otherwise the app will think that the remote device is the camera shutter, which is a part of the app, not your own DIY remote shutter. The camera initialization is not the same for the remote shutter and the camera shutter.

The circuit diagram is as follows. When the Z0 Snap button is pressed, a byte 'T' character is sent to the app, and the green LED will start flashing. When the app received 'T' character, it will start taking a picture. After finished taking a picture, the app will return a byte 'D' character to the remote shutter. If the remote shutter receives a 'D' character, the LED will stop blinking. If the remote shutter does not receive the 'D' character, the 10 seconds timeout will stop flashing.

When the Z1 Flash mode button is pressed, a byte 'M' character is sent to the app. The app will change the flash mode to next when it receives the 'M' character. You can also consider using other MCUs, like Arduino and so on.

Circuit Diagram

In circuit diagram there are two buttons, one for snap and another for flash mode. A LED is used to indicate taking a picture. A HC-06 Bluetooth module is used to receive/transmit command from/to android phone. A STC89C52RC microcontrolleri used to control the whole system.

Bluetooth Remote Toy: Privacy Policy and Disclaimer

Privacy Policy

Let's refer to "Bluetooth Remote Toy" as "the app".

  • The app asks for camera permission in order to use the camera to take photos.
  • The app asks for location permission is to allow users to geotag their photos, but this is optional and disabled by default. If enabled, the geotag information (your device location) is embedded in the photos' metadata. Location permission is also required for Bluetooth scan if the Android version is 6.0 or higher. I do not collect your location.
  • The app asks for storage permission in order to save the photos you take. The photos you take are saved by default in /DCIM/camera.
  • The app requires internet permission so that it can request advertisements through a net connection.

Disclaimer

When you use toy car control panel to remotely control your own DIY toy car or others, please find a safe and open place to play with your toys. The author (me) takes no responsibility for how/where you use this app. Use this app at your own risk.

Last updated: 2017/05/19.

2017年4月30日 星期日

8051 - MCU 8051 IDE Development Environment (繁)

底下開發環境是在Ubuntu 14.04,你可以使用VirtualBox安裝Ubuntu 14.04,這樣你就可以同時使用Windows與Ubuntu。

下載MCU 8051 IDE

官方網站:http://www.moravia-microsystems.com/mcu-8051-ide/

點擊『Download』->『mcu8051ide』->『mcu8051ide』->『1.4.10』->『mcu8051ide-1.4.10-all.deb』