Reference
Library
- DFRobot_RaspberryPi_Expansion_Board
- DFRobot_VEML6075
- DFRobot_Gesture_Touch
- smbus2 (IIC Learning Guide)
- spidev (SPI Learning Guide)
- GPIO Learning Guide
API Description
- DFRobot_RaspberryPi_Expansion_Board Library:
begin(): Initialize the board.get_adc_value(channel): Get ADC value from specified analog channel (A0-A3).set_pwm_duty(channel, duty): Set PWM duty cycle for specified channel (0-3 or ALL).set_pwm_frequency(freq): Set PWM frequency.
- DFRobot_VEML6075 Library:
begin(): Initialize the VEML6075 sensor.getUva(): Get UVA value.getUvb(): Get UVB value.getUvi(Uva, Uvb): Calculate UVI from UVA and UVB values.Uvi2mwpcm2(Uvi): Convert UVI to mW/cm².
- DFRobot_Expansion_Board_Servo Library:
move(channel, angle): Move servo to specified angle (0-180) for specified channel (0-3 or ALL).
Principle
- Raspberry Pi GPIO pins work with a maximum logic level of 3.3V.
- The board integrates an STM32 main controller to handle IO expansion.
- Analog ports use a 12-bit ADC to convert analog signals to digital data, sent to Raspberry Pi via IIC.
- PWM ports are controlled via IIC from Raspberry Pi, with support for external power supply (6-12V).
Other Supplementary Information
Note:
- The GPIO number in this board adopts BCM codes.
- When the VP port is not power by external power, the voltage of PWM ⊕ is 5V.
- When the VP port is powered by external power, the voltage of PWM ⊕ is equal to that of the VP external power (6-12V).
Was this article helpful?
