# Python Programming with LLM and Generative AI

## About

- Level: Beginner to Intermediate
- Lectures: 40 hours
- Self-study: 20 hours
- Exercises: 323
- Lines of code to write: 1098
- Format: e-learning + weekly online meeting with the instructor
- Language: English or Polish

## Description

Connect Python code with sensors, actuators, and networked devices. Practice reading measurements, exchanging data over MQTT or HTTP, and processing it on an edge device or in a cloud service. AIoT exercises introduce deploying and testing models close to the data source.

## Advantages

Follow a measurement from the device through transport, storage, and visualization. Learn how hardware limits, connectivity, data quality, and model behavior influence whether an IoT project works outside a demo.

## Target Audience

- Python developers working with connected devices and sensor data.
- Engineers building monitoring or automation prototypes.
- Developers exploring machine learning on edge hardware.

## Format

Learn through short videos and worked examples, then apply each topic in coding exercises. Automated checks help you test your solutions, and a progress spreadsheet helps you see what to work on next.

Weekly online meetings give you time for questions, code reviews, and working through difficult exercises with the instructor. Downloadable code, exercise templates, and reference notes support your independent practice.

Our trainers prepare the teaching materials from their professional experience. The materials have been developed since 2015, with more than 28,000 automated tests checking the code examples. Training is available in English or Polish.

## Course Outline

1. Introduction to the Internet of Things:

   - IoT system architecture: devices, gateway, cloud
   - Introduction to hardware platforms: Raspberry Pi, Arduino, ESP32, MicroPython, CircuitPython
   - Overview of communication protocols and standards
   - Development environment: setup, SSH, REPL
2. GPIO and hardware handling in Python:

   - RPi.GPIO and gpiozero libraries
   - Reading digital and analog signals
   - Controlling actuators: LEDs, relays, servomechanisms, DC motors
   - Interrupt-driven programming
3. Sensors and bus protocols:

   - I2C protocol: configuration and data reading
   - SPI protocol: configuration and peripheral communication
   - 1-Wire protocol: DS18B20 temperature sensors
   - Sensors: temperature and humidity (DHT22, BME280), PIR motion sensors, light and distance sensors
   - Calibration and filtering of measurement data
4. Network communication in IoT:

   - MQTT protocol: broker-client architecture, QoS, message retention
   - HTTP/REST API as an IoT device interface (FastAPI)
   - WebSocket and real-time bidirectional communication
5. Serialization and data formats:

   - JSON and MessagePack in IoT communication
   - Binary protocols: Protocol Buffers
   - Data validation and transmission error handling
   - Data compression and bandwidth optimization
6. Edge computing:

   - Edge vs. cloud computing concepts
   - Local data filtering and aggregation
   - Task scheduling: APScheduler, systemd timers
   - Queuing and buffering: Redis, SQLite
   - Event-based triggers and threshold alerts
7. Integration with cloud platforms:

   - AWS IoT Core: device registration, certificates, policies
   - Azure IoT Hub: device connection, Device Twin, Direct Methods
   - Mosquitto as a local MQTT broker
   - InfluxDB and Prometheus for time-series storage
   - Grafana: IoT data visualization
8. IoT application testing:

   - Specifics of embedded system testing
   - Hardware mocking: GPIO, sensors, and network interfaces
   - Unit testing of IoT modules
   - Integration testing: MQTT broker simulation (hbmqtt, pytest-mqtt)
   - Testing asynchronous IoT code with asyncio
9. Security in IoT systems:

   - TLS/SSL encryption in MQTT and HTTP communication
   - Certificate and key management
   - Device authentication and access authorization
   - Common IoT vulnerabilities and mitigation methods
10. AIoT — artificial intelligence on edge devices

    - AIoT concept: combining IoT with AI/ML at the edge
    - Comparison: local inference vs. cloud-based processing
11. Optional topics:

    - TinyML: ML models on microcontrollers and resource-constrained devices
    - TensorFlow Lite: model conversion and optimization (quantization, pruning)
    - ONNX Runtime on Raspberry Pi: model inference in Python
    - Sensor data classification: anomaly detection in time series
    - Computer vision on-device: OpenCV + picamera2, object and motion detection
    - Audio processing and keyword spotting
    - Model optimization for latency and energy consumption
12. Final project:

    - AIoT station project: data acquisition, local model inference, MQTT transmission, Grafana visualization
    - Code review and discussion of participant solutions

## Our Experience

AATC trainers have taught software engineering since 2015, delivering more than 11,000 hours of training to over 32,000 students worldwide. The exercises draw on that teaching experience and professional projects.

## Prerequisites

- Ability to develop software in Python at an intermediate level
- Understanding of object-oriented programming principles
- Basic knowledge of computer networks (TCP/IP, HTTP)
- Ability to use the Linux command line
- Basic knowledge of machine learning concepts (classification, regression) is helpful for AIoT modules
- Basic knowledge of electricity and electronics is not required but will be beneficial

## Setup

- Newest version of Python
- IDE of your choice (e.g., PyCharm, VSCode)
- Git installed and configured
- GitHub account
- Web browser (e.g., Chrome, Firefox, Safari, etc.)

## Related Courses

- [AI Programming](<https://aatc.pl/software/ai/ai/index.md>)
- [Vibe Coding](<https://aatc.pl/software/ai/vibe-coding/index.md>)
- [Neural Networks from Scratch](<https://aatc.pl/software/ai/neural-networks/index.md>)
- [Data Analysis and Visualization with Pandas](<https://aatc.pl/software/data-science/pandas/index.md>)
- [Numerical Analysis with Numpy](<https://aatc.pl/software/data-science/numpy/index.md>)
- [All Courses](<https://aatc.pl/software/index.md>)

## Date

This course is scheduled on demand. Contact us with your preferred dates and group size so we can check availability and arrange a suitable session.

## Contact

Email [info@aatc.pl](<mailto:info@aatc.pl>) for help with program details, preparation, or booking.

## Apply

To apply, email [info@aatc.pl](<mailto:info@aatc.pl>) with your name, the program you are interested in, and your preferred dates.
