openmv/usr/examples/02-Board-Control/uart_control.py
Kwabena W. Agyeman 2006cf9746 Example Work
* Filled in all the board control examples. Everything works except for
DAC.

* Moved test drawing scripts to drawing dir and renamed them and added
comments.

* Filled in all the image filter stuff. There are still some tests that
can be renamed, commented, and added to this folder. But, I will do that
later.

* Fixed motion detection thresholds.

* Fixed LCD script comments.

* Fixed BLE return value.
2016-04-20 17:10:44 -04:00

18 lines
505 B
Python

# UART Control
#
# This example shows how to use the serial port on your OpenMV Cam. Attach pin
# P4 to the serial input of a serial LCD screen to see "Hello World!" printed
# on the serial LCD display.
import time
from pyb import UART
# Always pass UART 3 for the UART number for your OpenMV Cam.
# The second argument is the UART baud rate. For a more advanced UART control
# example see the BLE-Shield driver.
uart = UART(3, 19200)
while(True):
uart.write("Hello World!\r")
time.sleep(1000)