CC3200 Modify the sprinkler routine of Out of Box[Copy link]
This post was last edited by littleshrimp on 2019-1-4 17:59 In the sprinkler example provided by the official Out of Box, the image update and the LED flashing of the development board will be out of sync. The reason is that after the switch is turned on, the development board only receives one blink instruction, and then the development board handles the LED flashing by itself. The web page also handles its own. In addition, the delay of the web page is 300ms, and the delay of the development board is 500ms. It would be strange if they can be synchronized.
In order to make the example look more comfortable, it is decided to use multiple instructions for synchronous control. When the switch is switched to on, no blink instruction is sent to the development board. Instead, a light-on instruction is sent to CC3200 every time the image is switched on in the timer. When the image is switched to off, a light-off instruction is sent to CC3200, and the modified web code is repeatedly executed.
Because the ON and OFF parameters are used, the LED status is controlled by the following two codes in the CC3200 project. In order to achieve better results, the delay needs to be reduced.
Basically synchronized. You can see that although the picture is updated before the instruction is sent, the LED status changes first and then the picture is updated. This may be related to the speed at which the browser updates the picture. This is also in line with the logic of powering the pump before spraying water. If you want to modify it more synchronously, you can add a delay before updating the LED. For example:
The modified html cannot be downloaded through IDE. You need to use CCS Uniflash provided by TI. Open C:\ti\CC3200SDK_1.3.0\cc3200-sdk\example\out_of_box\html\out_of_box.ucf and click program after setting the COM port
When downloading, you also need to jump J15 to 100 (flash) Using Uniflash will also burn the IAR compiled file into the following non-HTML code modification can be directly debugged by IAR