Gabriel Alejandro Giraldo Santiago
Created January 28, 2020 © GPL3+

Agricultural crop monitoring system with AdaCore

Design and build a system of monitoring and automation of agricultural crops and in the same way study the agroclimatic variables.

IntermediateProtipOver 1 day45

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
DHT11 Temperature & Humidity Sensor (3 pins)
DHT11 Temperature & Humidity Sensor (3 pins)
Grove - Water Sensor
Seeed Grove - Water Sensor
Grove - Air quality sensor v1.3
Seeed Grove - Air quality sensor v1.3
Helium Starter Kit (LEGACY)
Helium Starter Kit (LEGACY)
Second phase of the project

Software apps and online services

GNAT Community
AdaCore GNAT Community


Read more



First design of system of monitoring crops


I2C Interfaces

with Interfaces;

   with procedure Pull_SDA_Down;
   with procedure Release_SDA_Up;
   with procedure Pull_SCL_Down;
   with procedure Release_SCL_Up;
   with procedure Delay_T_HD_STA; -- 4.0
   with procedure Delay_T_SU_STO; -- 4.0
   with procedure Delay_T_Buf; -- 4.7..5
   with procedure Delay_T_Low_Half; -- 2.4
   with procedure Delay_T_High; -- 5
   with function SDA_State return Boolean;
package Soft_I2C is

   type Byte_Array is
     array (Interfaces.Unsigned_8 range <>) of Interfaces.Unsigned_8;

   type Error_Status is

   procedure Start;
   procedure Stop;
   procedure Write_Byte (Byte : Interfaces.Unsigned_8;
                         Status : out Error_Status);
   procedure Read_Byte (Byte : out Interfaces.Unsigned_8; Ack : Boolean);

   procedure Write (Address : Interfaces.Unsigned_8; Bytes : Byte_Array;
                    Status  : out Error_Status);

   procedure Read (Address : Interfaces.Unsigned_8; Bytes : in out Byte_Array);
end Soft_I2C;

Make File

test_i2c.elf: soft_i2c.adb uno_i2c.adb
	avr-gnatmake -p -XBOARD=arduino_uno -P i2c

test_i2c.hex: test_i2c.elf
	avr-objcopy -Obinary -R .eeprom test_i2c.elf test_i2c.hex

	avr-gnatclean -XBOARD=arduino_uno -P i2c

.PHONY: clean


Gabriel Alejandro Giraldo Santiago

Gabriel Alejandro Giraldo Santiago

10 projects • 57 followers
I am a young boy with ideal to achieve everything that I propose. Lover of Science, Technology and innovation.
Thanks to Tero Koskinen.