LattePanda 3 Delta with Arduino IDE
In the last LattePanda article, we just unboxed and explored the LattePanda 3 Deltas features and applications. Now are going to see the internal Arduino core of LattePanda 3 Delta then will try to integrate some sensors and communicate with them.
LattePanda 3 Delta Arduino Core ?:
As you can see there is a separate pin header in LattePanda 3 Delta, which is compatible with Arduino. That means there is an internal Arduino controller. We can directly use that for our projects.
The Arduino Leonardo ATMEGA32U4 is the internal Arduino core in LatteOand 3 Delta.
Arduino IDE ?️:
First let's look into the Arduino IDE setup in LattePanda 3 Delta, don't worry about the IDE & Driver installation. Since the Arduino IDE is preinstalled in the LattePanda 3 Delta board.
Also, the appropriate drivers are installed.
Now all the software setups are already done. So, we can directly move on to the hardware connections.
LattePanda 3 Delta Pinouts ⚙️:
Here is the overall pinout diagram of the LP3 Delta's IO.
In this, you can see the D13 pin is directly connected to the internal programmable LED.
Let's Blink the LED ?:
Launch the Arduino IDE in the LattePanda 3 Delta and open up the blink sketch
Note: Change the pin to 13.
Next, choose the board type as LattePanda Leonardo.
Then choose the correct port number.
That's all, upload the code to the board.
You can see the red LED is blinking. So, we can control this led via Arduino IDE.
Next, I have connected the grove led module to the LP3 pin 13.
DHT11 with LattePanda 3 Delta ?️:
To use the DHT11 sensor, first, we need the DHT11 library. Go to the library manager and search for DHTLIB and install the library.
Then select the DHT11 Sensor test code in the examples.
Note in this example code they are using Digital Pin 5. So, we have to connect the DHT11 with pin 5 of the LP3 Arduino.
Upload the code and open the serial monitor.
Note: Set baud rate as 115200
It will show you the Sensor status, Humidity level, and Temperature readings.
Light Sensor with LattePanda 3 Delta :
Next, let's try out some simple automation projects. In this, we are going to build LDR control LEDs. First, connect the LDR sensor pin to the analog pin of Lattepanda 3 Delta.
Note: In this I'm using Analog pin0.
I have added the mapping function to round off the values into 10.
Upload the code and look at the serial monitor results.
Next, we are going to add some led control. If the light value is below 5 it will turn off the green light and turn on the white led. Here is the complete code.
Here is the hardware connection.
In this article, we see how to access the Arduino core of the LattePanda3 Delta and some basic guides, Hope it helps. Will come up with another project. Thank you.