Very often the people ask me what is the best way to approach programming and hardware development. The answer is almost always the same: the C ++ language and specifically the Arduino framework.
The software part is therefore clear, but what about the hardware? The answer is Seeed Studio Grove Kit. A truly complete kit that allows you to approach the world of programming on Arduino language and even to develop complete projects using advanced sensors and facilitating the connection to the various hardware components present with the grove standard. This way you avoid short circuit accidents and avoid damaging the hardware components.
SeeedStudio Grove Kit on Amazon
In this review we will setup the Arduino environment and we will use the Mega Demo to show all the functions of the board. Follow the instruction and happy coding!
The kit is built on a high quality PCB! All sensors and components are connected to the board with an Arduino based microcontroller. Therefore it means that within the code it is possible to recall without problems the part of sensors and actuators directly without making any connection as all the hardware components are connected via the basic PCB.
SeeedStudio Grove Kit on Amazon
In this regard, it is also possible to detach the component part and possibly reuse it within custom projects. My advice is to not detach the components from the PCB and start testing the first codes using the default PCB.
The components are as follows:
1. Grove - LED: Simple
2. Grove - Buzzer: Piezo Buzzer
3. Grove - OLED Display 0.96": 128x64 dot resolution High brightness, self-smission and high contrast ratio
4. Grove - Button: Momentary Push Btton
5. Grove - Rotary Potentiometer: Adjustable Potentiometer
6. Grove - Light: Detects surrounding light intensity
7. Grove - Sound: Detects surrounding sound intensity
8. Grove - Temp%Humi Sensor: Detects surrounding temperature and humidity values
9. Grove - Air Pressure Sensor: Detect surrounding atmospheric pressure
10. Grove - 3 Axis Accelerator: Detects object acceleration
11. Seeeduino Lotus: Arduino Compatible Board with Grove Ports
Ports
1. LED || Digital || D4
2. Buzzer || Digital || D5
3. OLED || I2C || I2C, 0x78 (default)
4. Button || Digital || D6
5. Potentiometer || Analog || A0
6. Light || Analog || A6
7. Sound || Analog || A2
8. Temp & Humi || Digital || D3
9. Air Pressure || I2C || I2C, 0x77 (default) / 0x76 (optional)
10. Accelerator || I2C || I2C, 0x19 (default)
The First ProjectUpload a simple blink sketch
A. The Software
1. Install the driver
First af all you need the USB driver comunication. Download the driver in accord with your OS by using this link https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
2. Install the Arduino IDE
Download and install the last version of Arduino IDE by using this link https://www.arduino.cc/en/software
3. Upload the code
3.1 Open the Arduino IDE on your PC. Click on Tools -> Board-> Arduino AVR Boards-> Arduino Uno to select the correct Development Board Model. Select Arduino Uno as Board.
3.2 Click Tools -> Port to select the correct Port (the Serial Port showed in Device Manager in the previous step). In this case, COM11 is selected. For Mac OS users, it should be /dev/cu.SLAB_USBtoUART.
3.3 Copy and paste the following code in the Arduino IDE
// Projectg code for Seeed Studio January 2022
// The LED will turn on for one second and then turn off for half second
int ledPin = 4; //declare the pin for the led
void setup() {
pinMode(ledPin, OUTPUT); //define the pin 4 as an output
}
void loop() {
digitalWrite(ledPin, HIGH); //switch ON the PIN number 4 so the Led connect
delay(500); //delay for 500 millisecond
digitalWrite(ledPin, LOW); //switch OFF the PIN number 4
delay(500); // delay for 500 millisecond
}
B.TheHardware
1. Seeeduino Lotus
2. Grove LED
3. Grove Cable (If Broken out)
You can use this demo to show all the features in the kit and discover how to manage the entire components https://github.com/jpralves/grove-beginner-kit-for-arduino
1. Install the u8g2 library on the Arduino IDE
The first method that we will look at is the library manager, which can be loaded by navigating to Sketch > Include Library > Manage Libraries
From here, we can search for commonly used libraries and have the IDE automatically download and install them. In our case, we will install an U8g2 library so that we can connect our Arduino to an U8g2 device. Start by searching for “U8g2” in the upper right box. Then wait for the results to appear in the window.
Select the library and then click the “Install” button.
While the installation takes place, we should see the bottom progress bar changing and displaying messages such as “Downloading”.
2.Download the Grovebk4a Mega Demo
After the library installation download the Grovebk4aMegaDemo by Joao Alves jpralves@gmail.com. Latest versions are available in https://jpralves.net and https://github.com/jpralves/grove-beginner-kit-for-arduino
You can discover 10 different demos:
- logoShow.ino with buzzerShow.ino using OLED display module and buzzer module
- cubeShow.ino - 3D rotating cube using OLED display module
- microShow.ino - three different displays of a audio spectrum analyzer using the grove microphone module
- tempShow.ino - displays temperature and humidity using DHT11 module
- pressureShow.ino - displays pressure and temperature using BMP280 module
- aceleShow.ino - displays x, y, z acceleration using LIS3DHTR module
- lightShow.ino - displays values of light sensor module
- trimShow.ino - uses gauge to display value of the trimmer module
You can change the demos by pushing the button on the Grove Kit.
A quick look to these lines of code inside the grovebk4a-mega-demo.ino file can change the different demo scenario
void loop() {
if (digitalRead(buttonPin) == HIGH) {
while (digitalRead(buttonPin) == HIGH) delay(10);
stateMode = (stateMode + 1) % (sizeof(funcShow)/sizeof(funcShow[0]));
}
funcShow[stateMode]();
}
&logoShow, &cubeShow, µShow1, µShow2, µShow3, &tempShow, &pressureShow, &aceleShow, &lightShow, &trimShow
Meteo Station ProjectIn this project the board read the temperature and humidity values from DHT sensor and print the results on the OLED display.
The U8g2 library is required and all the file included in the zip package are required. SO download the zip package in this tutorial and open into the Arduino IDE. Upload the code and see the result. This is only the "main" commented code.
// Include all the library
#include <U8g2lib.h>
#include "DHT.h"
// declare the pins and setup the components
const byte dhtPin = 3;
DHT dht(dhtPin, DHT11);
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R2, /* reset=*/U8X8_PIN_NONE);
// setup the serial for the debug and the OLED display
void setup() {
Serial.begin(115200); //setup the serial port
u8g2.begin(); //setup the oled
}
// start the loop
void loop() {
const int col = 20;
int humid = dht.readHumidity(); //read the humidity
int temp = dht.readTemperature(); //read the temperature
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_t0_16b_mr);
u8g2.setCursor(col, 16);
u8g2.print(F("temp: "));
u8g2.print(temp);
u8g2.print(F("C"));
u8g2.setCursor(col, 48);
u8g2.print(F("humid: "));
u8g2.print(humid);
u8g2.print(F("%"));
u8g2.drawLine(10, 0, 10, 64);
} while(u8g2.nextPage());
}
Extra contents about the main boardThe "deep dive" on Seeed Studio Lotus Cortex-M0+
Technical Details
- Fully compatible with Arduino UNO
- ARM® Cortex®-M0+ 32bit 48MHz microcontroller(SAMD21)
- 12 on-board Grove connectors
- 14 Digital I/O Pins (10 PWM outputs)
- 6 Analog Inputs
- Support Power Path Management
- Support micro-usb or Li-Po battery powered
- 2A maximum charging current
- Suitable for low power design
Some specification about UART, battery and serial feature.
Grove UART- 3 hardware UART Port- 1 Grove UART- TX-RX pins in the header- Multiplexed function pin SCKSDO in the SWD port.
Serial portSerial corresponds to Grove UART, and Serial1 corresponds to RX-TX in the header zone.
Li-Po HeaderYou can use both USB and Li-Po battery supply for Seeeduino Lotus Cortex-M0+. Also, you can use this board to charge your Li-Po battery. When you power the board with USB and plug the Li-Po battery at the same time, the Li-Po battery will be charged, and the CHR LED will flash. After the battery is fully charged, the CHR LED will stop flashing.
Comments
Please log in or sign up to comment.