SOFTWARE
2024-02-08 522 View

GPIO Tutorial : Part 3

In the contemporary world of electronics, interfacing with EEPROM, real-time clocks (RTC), displays, sensors, and numerous other devices has been dramatically simplified, making electronic design less intricate, more streamlined, and demanding less hardware space. The credit for this significant advancement goes solely to I2C.

KIWIboard offers various interfaces for connecting external devices. The Inter-Integrated Circuit (I2C) is among these interfaces, a widely used serial communication protocol enabling multiple devices to communicate over short distances.

What is I2C?


I2C, or I²C, stands for Inter-Integrated Circuit, a communication protocol developed by Philips Semiconductors. It's a two-wire, synchronous, multi-master protocol enabling communication between multiple devices via a shared bus. 

How does i2c work on KIWIboards?


The I2C facilitates communication between the KIWIboards and connected peripherals operating through a shared bus. This communication protocol utilizes two wires: Serial Data (SDA) and Serial Clock (SCL). As the master device, KIWIboards control communication by generating clock pulses on the SCL line, regulating data transmission timing. Each slave device is assigned a unique address, enabling the master device to select and initiate communication with specific peripherals on the bus. Through this synchronous, multi-master protocol, KIWIboards can seamlessly exchange data with various peripherals, including sensors and integrated circuits, making them versatile platforms for a wide array of applications.

Applications of KIWIboards and I2C


1Internet of Things (IoT)

With I2C, KIWIboards connect easily to sensors for monitoring temperature, humidity, and more, making them a hub for IoT projects. Useful for smart home control or environmental monitoring, great for weather stations or smart home projects.

2. Industrial Monitoring

KIWIboards can monitor machines and collect data, helping with maintenance or inventory management tasks.

3. Science Experiments

KIWIboards can be used in labs for data collection and analysis, aiding research in various fields.

KIWIboards GPIO - I2C


For a simple demonstration, establish a connection between the VEML7700 sensor and the I2C interface of the KIWIboards. This straightforward setup highlights the GPIO I2C functionality of the KIWIboards, demonstrating their ability to communicate with peripherals effectively.

For further details regarding the sensor, please refer to the official documentation.

In order to set up the sample flow for Node-RED, please refer to our earlier publication. For more information, consult KIWI310's middleware documentation, which is available on Github

  • On the Node-RED's GPIO flow for I2C,  use the injection node to input the command register for the VEML7700. By default, the sensor has a 20h address.
  • Use the command 0X00:ALS power on to enable the sensor 

  • Use the command 0x04:  Read data to retrieve the 16-bit data for the luxes measurement.

Why KIWIboard Solutions?


 When coupled with the I2C communication protocol, KIWIboards gain the ability to interface seamlessly with a wide array of sensors, actuators, and other peripherals. This opens up possibilities for building sophisticated projects ranging from home automation systems to robotics and IoT devices. Additionally, I2C's simplicity and efficiency make it ideal for connecting multiple devices to the KIWIboards, enabling complex systems to be developed with relative ease. 

Next steps


Ready to talk about your projects with a KIWIboard expert? Contact us

Want to hear more from KIWIboard?  for our newsletterSign up

Or request a quotation