diff --git a/source/amebapro2/Example_Guides/I2C/Display Data on LCD Screen.rst b/source/amebapro2/Example_Guides/I2C/Display Data on LCD Screen.rst index 49816a9..5581601 100644 --- a/source/amebapro2/Example_Guides/I2C/Display Data on LCD Screen.rst +++ b/source/amebapro2/Example_Guides/I2C/Display Data on LCD Screen.rst @@ -16,7 +16,7 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ Normally there are many pins on an LCD display, as shown below. @@ -26,15 +26,15 @@ An LCD display can be equipped with an additional processing chip to process the using the I2C interface. Procedure ---------- +~~~~~~~~~ **AMB82 Mini** wiring diagram: |image02| -| Open the example in “File” -> “Examples” -> “AmebaWire” -> “LCD_HelloWorld”. +| Open the example in "File" -> "Examples" -> "AmebaWire" -> "LCD_HelloWorld". | Compile and upload to Ameba, then press the reset button. -| You can now see “Hello World” in the first line, and “Ameba” in the second line displayed on the LCD screen. +| You can now see "Hello World" in the first line, and "Ameba" in the second line displayed on the LCD screen. |image03| @@ -42,7 +42,7 @@ After 8 seconds, you can input to the Serial Monitor the string you would like t |image04| -For example, we enter “123456789” and press “Send”: +For example, we enter "123456789" and press "Send": |image05| diff --git a/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6 ImuData for ROS.rst b/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6 ImuData for ROS.rst index b3a1829..831d091 100644 --- a/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6 ImuData for ROS.rst +++ b/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6 ImuData for ROS.rst @@ -16,7 +16,7 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ This example will demonstrate getting the data from MPU6050 with DMP6. MPU6050 is equipped with a Digital Motion Processor (DMP) to handle the @@ -27,13 +27,13 @@ acceleration, adjusted to remove gravity, and rotated based on known orientation from quaternion. Procedure ---------- +~~~~~~~~~ Connect the MPU6050 to I2C_SDA and I2C_SCL of the board as shown in the diagram below. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “MPU6050”-> “MPU6050_DMP6_ImuData_for_ROS.ino”. +Open the example in "File" -> "Examples" -> "AmebaWire" -> "MPU6050"-> "MPU6050_DMP6_ImuData_for_ROS.ino". |image02| diff --git a/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6.rst b/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6.rst index 093a658..3096877 100644 --- a/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6.rst +++ b/source/amebapro2/Example_Guides/I2C/MPU6050 DMP6.rst @@ -16,7 +16,7 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ This example will demonstrate getting the data from MPU6050 with DMP6. MPU6050 is equipped with a Digital Motion Processor (DMP) to handle the @@ -33,14 +33,14 @@ For MPU6050_DMP6.ino, the DMP library version is 2.0. For MPU6050_DMP6_using_DMP_V6v12.ino, the DMP library version is 6.12. Procedure ---------- +~~~~~~~~~ Connect the MPU6050 to I2C_SDA and I2C_SCL of the board as shown in the diagram below. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “MPU6050”-> “MPU6050_DMP6” OR “MPU6050_DMP6_using_DMP_V6v12” +Open the example in "File" -> "Examples" -> "AmebaWire" -> "MPU6050"-> "MPU6050_DMP6" OR "MPU6050_DMP6_using_DMP_V6v12" |image02| diff --git a/source/amebapro2/Example_Guides/I2C/MPU6050 IMU Zero.rst b/source/amebapro2/Example_Guides/I2C/MPU6050 IMU Zero.rst index 794fcc1..c9a4f4b 100644 --- a/source/amebapro2/Example_Guides/I2C/MPU6050 IMU Zero.rst +++ b/source/amebapro2/Example_Guides/I2C/MPU6050 IMU Zero.rst @@ -16,18 +16,18 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ This example will demonstrate how to do calibration for the MPU6050 IMU. Procedure ---------- +~~~~~~~~~ Connect the MPU6050 to I2C_SDA and I2C_SCL of the board as shown in the diagram below. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “MPU6050”-> “MPU6050_IMU_Zero” +Open the example in "File" -> "Examples" -> "AmebaWire" -> "MPU6050"-> "MPU6050_IMU_Zero" |image02| diff --git a/source/amebapro2/Example_Guides/I2C/MPU6050 Raw Data.rst b/source/amebapro2/Example_Guides/I2C/MPU6050 Raw Data.rst index b5d261f..1e42178 100644 --- a/source/amebapro2/Example_Guides/I2C/MPU6050 Raw Data.rst +++ b/source/amebapro2/Example_Guides/I2C/MPU6050 Raw Data.rst @@ -16,18 +16,18 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ This example will demonstrate getting the raw data from MPU6050. Procedure ---------- +~~~~~~~~~ Connect the MPU6050 to I2C_SDA and I2C_SCL of the board as shown in the diagram below. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “MPU6050”-> “MPU6050_raw”. +Open the example in "File" -> "Examples" -> "AmebaWire" -> "MPU6050"-> "MPU6050_raw". |image02| diff --git a/source/amebapro2/Example_Guides/I2C/Master Receive Data from Arduino UNO.rst b/source/amebapro2/Example_Guides/I2C/Master Receive Data from Arduino UNO.rst index 1701a89..d32795a 100644 --- a/source/amebapro2/Example_Guides/I2C/Master Receive Data from Arduino UNO.rst +++ b/source/amebapro2/Example_Guides/I2C/Master Receive Data from Arduino UNO.rst @@ -15,44 +15,44 @@ Materials Example ------- -Introduction of I2C -------------------- +I2C Introduction +~~~~~~~~~~~~~~~~ -There are two roles in the operation of I2C, one is “master”, the other -is “slave”. Only one master is allowed and can be connected to many +There are two roles in the operation of I2C, one is "master", the other +is "slave". Only one master is allowed and can be connected to many slaves. Each slave has its unique address, which is used in the communication between master and the slave. I2C uses two pins, one is for data transmission (SDA), the other is for the clock (SCL). Master uses the SCL to inform slave of the upcoming data transmission, and the -data is transmitted through SDA. The I2C example was named “Wire” in the +data is transmitted through SDA. The I2C example was named "Wire" in the Arduino example. Introduction ------------- +~~~~~~~~~~~~ In the example "I2C - Send Data to Arduino Uno", Ameba, the I2C master, transmits data to the Arduino UNO, the I2C slave. As to this example, Ameba is the I2C master, and receives data from the Arduino UNO, which is the I2C slave. Procedure ---------- +~~~~~~~~~ - **Setting up Arduino Uno to be I2C Slave** -| First, select Arduino in the Arduino IDE in “Tools” -> “Board” -> “Arduino Uno”: -| Open “Examples” -> “Wire” -> “slave_sender” +| First, select Arduino in the Arduino IDE in "Tools" -> "Board" -> "Arduino Uno": +| Open "Examples" -> "Wire" -> "slave_sender" |image01| -Then click “Sketch” -> “Upload” to compile and upload the example to Arduino Uno. +Then click "Sketch" -> "Upload" to compile and upload the example to Arduino Uno. - **Setting up Ameba to be I2C Master** -| Next, open another window of Arduino IDE, make sure to choose your Ameba development board in the IDE: “Tools” -> “Board” -| Open “File” -> “Examples” -> “AmebaWire” -> “MasterReceiveData” +| Next, open another window of Arduino IDE, make sure to choose your Ameba development board in the IDE: "Tools" -> "Board" +| Open "File" -> "Examples" -> "AmebaWire" -> "MasterReceiveData" |image02| -Click “Sketch” -> “Upload” to compile and upload the example to Ameba. +Click "Sketch" -> "Upload" to compile and upload the example to Ameba. - **Wiring** @@ -66,16 +66,16 @@ Click “Sketch” -> “Upload” to compile and upload the example to Ameba. | Next, we will observe the data receive by Ameba in the Serial Monitor. | (Note: If you do not know which port the Ameba development board is connected to, please find it in the Device Manager of Windows first. - Ameba is connected as “mbed Serial Port”. For example, if you find + Ameba is connected as "mbed Serial Port". For example, if you find mbed Serial Port (COM15) means Ameba is connected to port COM15.) |image04| -| We select the port in “Tools” -> “Port” -> “COM15” (the port connected to Ameba) -| Open the Arduino IDE window of the Ameba, go to “Tools” -> “Serial Monitor” to display the messages printed by Ameba. +| We select the port in "Tools" -> "Port" -> "COM15" (the port connected to Ameba) +| Open the Arduino IDE window of the Ameba, go to "Tools" -> "Serial Monitor" to display the messages printed by Ameba. | Press the reset button on Arduino Uno, Arduino Uno now waits for connection from I2C master. | Then press the reset button on Ameba, Ameba will start to receive - messages from Arduino Uno. And you can see the “hello” message + messages from Arduino Uno. And you can see the "hello" message printed every half second in serial monitor. | (NOTE: If the message does not show in the Serial Monitor of Ameba, please close and open the serial monitor again.) @@ -88,10 +88,10 @@ Code Reference | You can find detailed information of this example in the documentation of Arduino: | https://www.arduino.cc/en/Tutorial/MasterReader -| First use Wire.begin()/Wire.begin(address) to join the I2C bus as a master or slave, in the Master case the address is not required. +| First use ``Wire.begin()`` / ``Wire.begin(address)`` to join the I2C bus as a master or slave, in the Master case the address is not required. | https://www.arduino.cc/en/Reference/WireBegin -| Next, the Master uses Wire.requestFrom() to specify from which Slave to request data. +| Next, the Master uses ``Wire.requestFrom()`` to specify from which Slave to request data. | https://www.arduino.cc/en/Reference/WireRequestFrom .. |image01| image:: ../../../_static/amebapro2/Example_Guides/I2C/Master_Receive_Data_from_Arduino_UNO/image01.png diff --git a/source/amebapro2/Example_Guides/I2C/Master Send Data to Arduino UNO.rst b/source/amebapro2/Example_Guides/I2C/Master Send Data to Arduino UNO.rst index b3ab4e7..cb5019e 100644 --- a/source/amebapro2/Example_Guides/I2C/Master Send Data to Arduino UNO.rst +++ b/source/amebapro2/Example_Guides/I2C/Master Send Data to Arduino UNO.rst @@ -12,24 +12,23 @@ Materials - Arduino UNO x 1 - Example ------- -Introduction of I2C -------------------- +I2C Introduction +~~~~~~~~~~~~~~~~ -There are two roles in the operation of I2C, one is “master”, the other -is “slave”. Only one master is allowed and can be connected to many +There are two roles in the operation of I2C, one is "master", the other +is "slave". Only one master is allowed and can be connected to many slaves. Each slave has its unique address, which is used in the communication between master and the slave. I2C uses two pins, one is for data transmission (SDA), the other is for the clock (SCL). Master uses the SCL to inform slave of the upcoming data transmission, and the -data is transmitted through SDA. The I2C example was named “Wire” in the +data is transmitted through SDA. The I2C example was named "Wire" in the Arduino example. Introduction ------------- +~~~~~~~~~~~~ In this example, we use Ameba as the I2C master writer, and use Arduino as the I2C slave receiver. @@ -38,21 +37,21 @@ When the I2C slave receives string sent from I2C master, it prints the received string. Procedure ---------- +~~~~~~~~~ - **Setting up Arduino Uno to be I2C Slave** -| First, select Arduino in the Arduino IDE in “Tools” -> “Board” -> “Arduino Uno” -| Open the “Slave Receiver” example in “Examples” -> “Wire” -> “slave_receiver”: +| First, select Arduino in the Arduino IDE in "Tools" -> "Board" -> "Arduino Uno" +| Open the "Slave Receiver" example in "Examples" -> "Wire" -> "slave_receiver": |image01| -Then click “Sketch” -> “Upload” to compile and upload the example to Arduino Uno. +Then click "Sketch" -> "Upload" to compile and upload the example to Arduino Uno. -- Setting up Ameba to be I2C Master +- **Setting up Ameba to be I2C Master** -| Next, open another window of Arduino IDE, make sure to choose your Ameba development board in the IDE: “Tools” -> “Board” -| Then open the “Master Writer” example in “File” -> “Examples” -> “AmebaWire” -> “MasterSendData” +| Next, open another window of Arduino IDE, make sure to choose your Ameba development board in the IDE: "Tools" -> "Board" +| Then open the "Master Writer" example in "File" -> "Examples" -> "AmebaWire" -> "MasterSendData" |image02| @@ -65,7 +64,7 @@ Then click “Sketch” -> “Upload” to compile and upload the example to Ard |image03| -| Open the Arduino IDE of the Arduino Uno and open the serial monitor (“Tools” -> “Serial Monitor”). +| Open the Arduino IDE of the Arduino Uno and open the serial monitor ("Tools" -> "Serial Monitor"). | In the Serial Monitor, you can see the messages printed from Arduino Uno. | Next, press the reset button on Arduino Uno. Now the Arduino Uno is waiting for the connection from I2C Master. | We press the reset button on Ameba to start to send messages. Then observe the serial monitor, you can see the messages show up every half second. @@ -78,13 +77,13 @@ Code Reference | You can find detailed information of this example in the documentation of Arduino: | https://www.arduino.cc/en/Tutorial/MasterWriter -| First use Wire.begin()/Wire.begin(address) to join the I2C bus as a master or slave, in the Master case the address is not required. +| First use ``Wire.begin()`` / ``Wire.begin(address)`` to join the I2C bus as a master or slave, in the Master case the address is not required. | https://www.arduino.cc/en/Reference/WireBegin -| Next, the Master uses Wire.beginTransmission(address) to begin a transmission to the I2C slave with the given address: +| Next, the Master uses ``Wire.beginTransmission(address)`` to begin a transmission to the I2C slave with the given address: | https://www.arduino.cc/en/Reference/WireBeginTransmission -| Uses Wire.write() to send data, and finally use Wire.endTransmission() to end a transmission to a Slave and transmits the bytes that were queued: +| Uses ``Wire.write()`` to send data, and finally use ``Wire.endTransmission()`` to end a transmission to a Slave and transmits the bytes that were queued: | https://www.arduino.cc/en/Reference/WireEndTransmission .. |image01| image:: ../../../_static/amebapro2/Example_Guides/I2C/Master_Send_Data_to_Arduino_UNO/image01.png diff --git a/source/amebapro2/Example_Guides/I2C/OLED Display.rst b/source/amebapro2/Example_Guides/I2C/OLED Display.rst index df0f2e9..2cc673a 100644 --- a/source/amebapro2/Example_Guides/I2C/OLED Display.rst +++ b/source/amebapro2/Example_Guides/I2C/OLED Display.rst @@ -16,20 +16,20 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ The example will showcase texts, shapes, and bitmap images on an OLED display using the I2C communication protocol alongside Adafruit libraries. Procedure ---------- +~~~~~~~~~ Connect the 0.96-inch OLED display to I2C_SDA and I2C_SCL of the board. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “OLED_SSD1306”. +Open the example in "File" -> "Examples" -> "AmebaWire" -> "OLED_SSD1306". |image02| @@ -37,9 +37,9 @@ For this example, we will be using 0x3D as the address. |image03| -If the address doesn’t work for you, you can run I2CScanner to find the -OLED address by navigating to “File” -> “Examples” -> “AmebaWire” -> -“I2CScanner”. +If the address doesn't work for you, you can run I2CScanner to find the +OLED address by navigating to "File" -> "Examples" -> "AmebaWire" -> +"I2CScanner". |image04| diff --git a/source/amebapro2/Example_Guides/I2C/Retrieve Data from VL53L0X IR sensor.rst b/source/amebapro2/Example_Guides/I2C/Retrieve Data from VL53L0X IR sensor.rst index 32c5a51..3eb7f49 100644 --- a/source/amebapro2/Example_Guides/I2C/Retrieve Data from VL53L0X IR sensor.rst +++ b/source/amebapro2/Example_Guides/I2C/Retrieve Data from VL53L0X IR sensor.rst @@ -16,7 +16,7 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ This example will illustrate how to retrieve the value of VL53L0X IR sensor and pass it to the AMB82-Mini board. VL53L0X Distance Sensor is a @@ -29,17 +29,17 @@ has pretty low power consumption. | 2) Single.ino Procedure ---------- +~~~~~~~~~ Connect the VL53L0X IR sensor to I2C_SDA and I2C_SCL of the board as shown in the diagram below. |image01| -Open the example in “File” -> “Examples” -> “AmebaWire” -> “VL53L0X” -> “Continuous” OR “Single”. +Open the example in "File" -> "Examples" -> "AmebaWire" -> "VL53L0X" -> "Continuous" OR "Single". |image02| -You will choose “Single” if you want to get single-shot range +You will choose "Single" if you want to get single-shot range measurements from the VL53L0X sensor. The sensor can be optionally be configured with different ranging profiles to get better performance for a certain application. diff --git a/source/amebapro2/Example_Guides/I2C/Scan I2C devices.rst b/source/amebapro2/Example_Guides/I2C/Scan I2C devices.rst index 87941a6..00cc76a 100644 --- a/source/amebapro2/Example_Guides/I2C/Scan I2C devices.rst +++ b/source/amebapro2/Example_Guides/I2C/Scan I2C devices.rst @@ -5,7 +5,6 @@ Scan I2C devices :local: :depth: 2 - Materials --------- @@ -17,17 +16,17 @@ Example ------- Introduction ------------- +~~~~~~~~~~~~ The example will scan the I2C bus for devices that is connected to Ameba. When a device is found, it will be shown on the serial monitor with the address of the device. Procedure ---------- +~~~~~~~~~ Connect any I2C device to I2C_SDA and I2C_SCL of the board. -Open the example in “File” -> “Examples” -> “AmebaWire” -> “I2C_Scanner”. +Open the example in "File" -> "Examples" -> "AmebaWire" -> "I2C_Scanner". |image01|