DRE 2312 – Computer Programming and Data Structure – Communication Protocols: I2C, SPI, and UART

Dear DRE-ian,

Let’s delve into the communication protocols – specifically, I2C, SPI, and UART. Recall Activity 4 DRE 2312 – you’ve already dipped your toes into BME280 sensor – to read humidity, temperatures and pressure using Raspberry Pi.

Take a closer look at these protocols that make data exchange between devices a seamless experience.

In the world of electronics, devices must communicate with each other effectively. Think of communication protocols as the languages that allow different components to exchange information. Among these protocols, I2C, SPI, and UART stand out for their versatility and widespread use.

  1. I2C – Inter-Integrated Circuit: Connecting the Dots
    • Imagine I2C as a busy highway where multiple vehicles (devices) can communicate using a shared set of lanes (bus) – Scroll below to the animation by Parlezvaustech.
    • This two-wire protocol allows seamless communication between devices, enabling your Raspberry Pi to effortlessly collect data from I2C-enabled sensors.
    • It’s like having a network of devices, each with its own unique address, sharing information along the I2C highway.
  2. SPI – Serial Peripheral Interface: High-Speed Data Exchange
    • SPI, on the other hand, is like a private road system, providing high-speed, full-duplex communication between devices.
    • Each device on the SPI bus has its own dedicated communication lines, making it ideal for scenarios where speed and real-time data exchange are crucial.
    • This protocol is the key to unlocking the full potential of advanced sensors in your projects.
  3. UART – Universal Asynchronous Receiver/Transmitter: Simple and Reliable Communication
    • If I2C and SPI are like highways and private roads, then UART is like a two-way radio communication system.
    • This protocol involves two wires, one for transmitting and one for receiving. UART is simple, reliable, and widely used for connecting devices over short distances.
    • Your Raspberry Pi can easily communicate with UART-enabled sensors, making it a valuable tool in your programming arsenal.

Recall Activity 4 in Part B RPi: Controlling Sensors with Raspberry Pi
Now, let’s bring theory into practice. Imagine a scenario where you want your Raspberry Pi to collect temperature data from an I2C temperature sensor, pressure data from an SPI pressure sensor, and transmit the combined information to another device using a UART connection. With the knowledge of these communication protocols, you can seamlessly integrate these sensors into your projects, opening doors to a world of possibilities.

Challenges and Solutions: Troubleshooting in the World of Protocols
As you embark on your programming journey, you may encounter challenges in working with these protocols. Fear not! From addressing address conflicts in I2C to handling clock synchronization in SPI, understanding the common pitfalls and their solutions is crucial for becoming a proficient engineer.

The Future of Communication Protocols: Beyond DRE 2213 🙂
As you progress in your studies, you’ll discover that the world of communication protocols is ever-evolving. New standards and technologies emerge, and the ability to adapt is key. Whether you’re designing embedded systems, IoT devices, or robotics, a solid understanding of communication protocols will be your guiding light.

In the context of electrical and electronics engineering, mastering communication protocols is akin to learning a universal language. I2C, SPI, and UART are the cornerstones of seamless data exchange, and as you continue your programming journey, these protocols will become invaluable tools in your arsenal. So, buckle up, as you explore the exciting world of I2C, SPI, and UART – the languages that bring your electronic creations to life!

DRE 2213 – Prog and Data Structure – Design Thinking

Dear DRE-ian,

Congratulations on successfully completing Part B of our program! It’s evident that you’ve progressed beyond the novice stage, and what better way to mark this milestone than by embarking on a project. As you step into the next phase of your journey, we encourage you to choose a project topic from the provided list of five options. To express your interest and commitment, kindly register using the Google link shared earlier.

I encourage you to apply Design Thinking Strategies, which we discussed in class today, to shape and refine your project. The knowledge and skills you’ve acquired over the past 10 weeks serve as a solid foundation for you to actively contribute to the open-source community. Python, being a key focus, provides a fantastic starting point, and please explore additional techniques that can enhance and enrich your solution.

The deadline for project submissions is December 31st, and we have scheduled presentations for January 10th, 2024. This is a great opportunity for you to showcase your creativity, problem-solving abilities, and the application of your newfound knowledge.

I am excited to see what you will create 🙂 and how you will contribute to the open-source community.

Your project holds the potential to make a meaningful impact, and we look forward to witnessing your journey and success. Best of luck with your project development!

 

DRE 2213 – Prog and Data Structure – Week 5

Hi DRE-ian,

The past 5 weeks, you’ve created your version of Slider Game. Throughout the development process, you’ve code the following in Python environment:-

  1. Game Window Properties (object oriented approach)
    1. Basic Programming Concepts in Python
    2. control statements
  2. Player Character Description,
    1. Programming Relevance – Python Basics
    2. Function Implementation
    3. Control Flow
  3. Player Movement Logic
    1. Programming Constructs
    2. Enemy Properties
    3. Programming Integration
  4. Enemy Behavior
    1. Scoring Logic
    2. Programming Elements
  5. Game Scoring Mechanism
    1. Logic Implementation
    2. Timing Systems,
    3. Data Structures

Wishing you all the best everyone in TEST 1 =)

Also, remember to submit your Assignment 1  – assessment between Nov 8th –  18th.

DRE 2213 – Prog and Data Structure – Week 4

Congratulations DRE-ian,

You have officially created your own game on Python!

 

As you may now reach the final step of your Slider Game activities, please complete the following checklist for for Week 4:-

  1. Upload your Replit codes (in .pdf format) for each, step 1 – 7, in Kalam (attendance is based on this submission)
  2. complete Quiz 4 (due by tomorrow)
  3. download instruction for DRE2213 Assignment (20%) from Kalam. Plan ahead the modifications that you would like to do. we’ll discuss this in the upcoming class
  4. revise for Test 1, scheduled on Tuesday Nov 7th

DRE 2213 – Prog and Data Structure – Week 3

Hi DRE-ians, below are->

 

Checklist for Week 3:-
  1.  Complete, compile and run the codes in Activity 3 – Player movement (individual)
  2. Complete, compile and run the codes in Activity 4 – Enemy Creation and movements (individual)
  3. Complete, compile and run the codes in Activity 5 – Collisions (individual)
  4. Answer Quiz 3 in KALAM (individual)
  5. 1-page infographic of Act 3 , 4 and 5 – submit it via google slides (do in pair)
Resources:-
  1. Digital colors 
  2. Pixel coordinate systems
  3. Act 3, 4 & 5 Instructions