Artificial Intelligence – Python Programming – Train the Trainers Workshop

A 4-days workshop crafted for academicians from Polytechnics Malaysia.

I recently conducted a comprehensive 4-day workshop to introduce participants (among academicians from Polytechnics in Malaysia) to both fundamental and advanced topics, offering hands-on activities that showcased the powerful applications of AI, electronics, and programming.

Below is a summary of the activities we conducted over the course of this workshop.

Day 1  Foundations of AI, Python, and Raspberry Pi
The workshop kicked off with an introduction to AI and the Raspberry Pi microprocessor. We started with a fun ice-breaker activity, Introduction BINGO, where participants got to know each other. Afterward, we delved into the fundamental concepts of hardware and electronic components, ensuring everyone was comfortable with the physical aspects of working with a Raspberry Pi.

Key Topics Covered –

  1. Hardware & Electronic Components – Understanding the basics of the Raspberry Pi, GPIO pins, and essential sensors.
  2. Raspberry Pi Microprocessor – Overview of how Raspberry Pi works and its applications in AI.
    This foundational day set the stage for the deeper dives into programming and hardware control that were to follow.

Day 2 Control Statements, Communication, and Sensors

We began Day 2 by introducing participants to Python control statements, providing the backbone for controlling the hardware components with Python scripts. This session included practical activities focused on various communication protocols like I2C and SPI, commonly used for sensor integration.

Key Activities and Topics –

  1. Python Control Statement – Introducing loops, conditions, and their use in hardware control.
  2. Communication Protocols – Learning how Raspberry Pi communicates with sensors using I2C and SPI.

Hands-on Activities –

  1. Act 1, 2 – LED ON and OFF Control – Participants learned to turn LEDs on and off using Python.
  2. Act 3 – LED Blinking – Adding logic to make LEDs blink at intervals.
  3. Act 4 – Keyboard Control – Using the keyboard to interact with hardware components like LEDs.
  4. Act 5 – OLED Display -We explored controlling an OLED display using Python libraries and the I2C protocol. This included displaying text and graphics, which captivated participants, demonstrating the versatility of the Raspberry Pi as an interface device.

Day 3 Exploring Sensors and Camera Controls

On Day 3, we moved into more complex sensor and camera integration. Participants worked hands-on with various sensors to collect and process real-world data.

Key Sensors Covered –

  1. Act 6 – I2C Accelerometer: Using accelerometers to measure movement and tilt.
  2. Act 7 – Ultrasonic Sensor: Measuring distances using ultrasonic waves.
    We also explored using the camera with the Raspberry Pi
  3. Act 8 – Camera / Image: Capturing still images and processing them.
  4. Act 9 – Video Streaming: Streaming live video using the Raspberry Pi camera, giving participants a look at real-time image processing.
    We ended the day by learning how to remotely control the Raspberry Pi using SSH Scripting for headless setups.
    Day 4: Advanced Camera Control and Project Development
    The final day was packed with creative development. Participants were introduced to more advanced concepts of camera control using Python and integrating this control into group projects.

Key Highlights

  1. Camera Control & Geany – Using Geany, a lightweight integrated development environment (IDE), to control cameras with custom scripts.
  2. Project Development – Each group was tasked with designing and developing a project, incorporating the skills learned over the past three days. The projects ranged from simple security systems to advanced sensor networks.
    1. Participants also learned how to set up their Raspberry Pi in Headless Mode, using SSH to control it without a dedicated monitor or keyboard.
    2. Project Presentation and Way Forward
    3. After completing their group projects, participants presented their creations, showcasing the applications of Python programming, sensors, and AI-based hardware control. The final session was a recap of the key concepts, where participants were encouraged to continue exploring AI and Raspberry Pi on their own. They also completed a Post-Test to measure their progress throughout the course.

Looking Forward
This workshop is just the beginning. The potential of Raspberry Pi combined with Python programming offers limitless possibilities, from creating AI-powered projects to building real-world applications. Participants left equipped with the skills and confidence to continue their journey in AI and embedded systems development.

Conclusion
In just four days, participants transitioned from having no experience with Raspberry Pi or Python to developing their own AI-based projects. This course laid a strong foundation for understanding hardware, software, and AI in a hands-on, engaging way. The combination of sensors, control statements, and camera-based projects showcased the immense power of integrating AI and Python with Raspberry Pi.

Stay tuned for more workshops that push the boundaries of AI and embedded programming!

I hope everyone had enjoyed the course as much as I did in facilitating it.

Nurul (Oct 3rd, 2024)

Day 4

Day 3

 

Day 2

Day 1

Misc