0% found this document useful (0 votes)
14 views17 pages

Internship Training Manual

Uploaded by

MUHAMMAD QAISAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views17 pages

Internship Training Manual

Uploaded by

MUHAMMAD QAISAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Internship Training Manual

General Requirements
- Hardworking, decent & honest
- Intelligent
- Should have the ability to assimilate complex ideas
- Experienced candidates MUST have excellent communication skills & understand how to
train, manage & help less experienced colleagues grow
- Recently graduating candidates MUST have the ability to learn by doing [1] [2] using online
learning methods/tutorials
- Must have the ability to follow instructions1
- Must be a team player [1] [2]
- Understand good work ethic [1]
- Must be a good fit into our team culture
- Must value your time & our time [1]
- Should treat everyone 2 with respect
- Must know how to use the internet 3
- Must have clear core concepts
- Excellent Programming & algorithm development skills
- Must have the ability to learn independently (without being asked)
- Must be good at reading documentation
- Experienced candidates must be good at writing documentation
- Must be able to summarize documents/tutorials/videos & teach core concepts to other team
members
- Must be passionate
- Must enjoy work
- Must be ambitious & motivated

1
Please follow instructions provided to you during the interview, test and training phase. We don't like asking twice. This is
especially important for fresh graduates.
2
Everyone means everyone, including our support & cleaning staff
3
We don't expect you to know the answer to every question but we do expect you to know where to look. You should know how to
google solutions to problems and use stackoverflow / online user forums / online community resources / discussion groups to your
advantage. We expect you to know how and where to search for solutions to problems that you don't understand. We expect that
before you ask a colleague, you will have tried your best to search for a solution online (by yourself)
SUGGESTED SCHEDULE FOR EACH DAY
Morning (3 hours):

1. Study and review the allocated topics using online resources, textbooks, or other
study materials.
2. Practice examples and exercises related to the topics on OnlineGDB.

Afternoon (3 hours):

1. Deep dive into complex topics or areas where you feel less confident.
2. Implement small projects or solve coding problems to reinforce understanding.

Evening (2 hour):

1. Review the day's learning and make notes of key points.


2. Prepare questions or identify areas that need further clarification for the next day.

Learning C

Basics and Foundations


1. Variables, keywords and scope [1] [2] [3] [4] [5] [6]
2. Data types [1] [2] [3] [4] [5]
3. Enums [1] [2] [3] [4]
4. Preprocessor basics [1]
5. Operators (Modulus) [1] [2] [3]
6. Loops, conditional statements and decent hold of syntax [0] [1] [2] [3] [4] [5] [6]
7. String manipulation

Structures and Functions


1. Structures [1] [2] [3] [4] [5] [6]
2. Functions [1]
3. Pointers [0] [1] [2] [3] [4] [5]
4. Function Pointers [1] [2] [3] [4] [5] [6]

Advanced Concepts
1. Bit Masking [0] [1]
2. Bitwise operators [1] [2] [3] [4] (very important)
3. Bit Manipulation [0] [1] [2] [3] (very important)
4. Inline functions & macros [1] [2]
5. Parsing a string with sscanf [1] [2] [3] [4] [5] [6] [7] [8] (very important)
6. Using sprintf function to generate dynamic strings [1] [2] [3] [4] [5] (very important)
Memory and Compilation
1. Static vs dynamic memory allocation / fragmentation [1] [2] [3] [4] [5]
2. Pointers & Dynamic memory [1]
3. Linked Lists [1] [2] [3] [4] [5] [6]
4. Knowledge about different compilers [1] [2]
5. Compiling C programs with multiple files [1] [2]

Practical Applications and Review

1. develop algorithms and write code in C [1] [2]


2. Preprocessing directives (#ifdef) and basic questions about compilers [1] [2] [3] [4] [5]
[6] [7]
3. How can you swap two numbers without using a third/ temp variable ? [1]
4. How computers count [1]
5. What's the difference between a dynamic vs static language (examples of the two kinds
?)
6. Live coding practice and review of all topics

LEARNING OUTCOME
After completing this 5-day crash course in C programming, you should achieve the
following overall learning outcomes:

1. Proficient understanding of C language syntax and concepts, including variables, data


types, operators, and control flow constructs.
2. Ability to define and use structures and enums for organizing and managing data.
3. Mastery of pointers and dynamic memory management, including pointer arithmetic and
memory allocation/deallocation.
4. Competence in bitwise operations and bit manipulation techniques.
5. Skill in string manipulation and parsing using functions like sscanf and sprintf.
6. Knowledge of function pointers and advanced function concepts for flexible and dynamic
code structures.
7. Experience with linked lists and dynamic data structures.
8. Familiarity with preprocessing directives and macros for versatile and maintainable code.
9. Understanding of the compilation process and managing multi-file C projects.
10. Ability to develop efficient algorithms and solve programming problems using C.
11. Preparedness for live coding and technical interviews, with confidence in writing and
debugging C code.
WEEK 1 introduction to the ESP32 and ESP-IDF

Day 1: Setting Up the Development Environment

Objectives:

● Download and setup Visual Studio Code.


● Download and set up ESP-IDF.
● Verify the installation by building and running a sample project.

Steps:

1. Download and Install Visual Studio Code:


○ Go to the Visual Studio Code website.
○ Download and install Visual Studio Code.
2. Download and Install ESP-IDF:
○ Follow the ESP-IDF Getting Started Guide.
○ Set up the ESP-IDF environment variables.
3. Install ESP-IDF Extension for Visual Studio Code:
○ Open Visual Studio Code.
○ Go to Extensions (Ctrl+Shift+X) and search for "Espressif IDF".
○ Install the extension.
4. Verify the Installation:
○ Open the ESP-IDF terminal, navigate to the hello_world project directory.
○ Run the hello_world example:

cd example/get-started/hello_world

idf.py fullclean
idf.py set-target esp32
idf.py build
idf.py flash
idf.py monitor

○ Verify that "Hello World" prints to the serial monitor.

Exercise:

● Document Verification: Write a short report on the steps you followed to set up
Visual Studio Code and ESP-IDF, including any issues faced and how you
resolved them.
Day 2: Exploring ESP-IDF, Basic Commands and Project setup

Objectives:

● Learn about ESP-IDF structure and components.


● Understand and use basic ESP-IDF commands.
● Create a new project using ESP-IDF.
● Learn how to create and configure components in ESP-IDF.
● Understand how to set up CMakeLists.txt for components.
● Learn how to include and use components in the main application.

Steps:

1. Explore ESP-IDF Structure:


○ Read about the ESP-IDF directory structure in the Programming Guide.
2. Basic ESP-IDF Commands:
○ Learn and try the following commands:
■ idf.py fullclean
■ idf.py set-target
■ idf.py build
■ idf.py flash
■ idf.py monitor -p COM-PORT
■ idf.py menuconfig
■ idf.py erase_flash
3. Read the Components Section:
○ Study the ESP-IDF Components Documentation.
4. Create a New Project:
○ Follow the steps to create a new project from the Getting Started Guide.
○ You can also create a new project easily by going to the getting started
project directory and there is a sample-project copy it and paste it and
give it a name of your choice. This is the easy way to create a new project
without going for the commands to create the project.
5. Create a Component:
○ Follow the steps to create a new component.

Configure CMakeLists.txt:

● Learn how to configure the CMakeLists.txt file for your component.


● Example CMakeLists.txt:

idf_component_register(SRCS "my_component.c"
INCLUDE_DIRS "include")
Include Component in Main Application:

● Modify the main CMakeLists.txt to include your new component.

Exercise:

● Project Creation: Create a new ESP-IDF project, build it, flash it to the ESP32,
and monitor the output. Document the process and any issues encountered.
● Create and Use a Component:
○ Create a simple component that provides a utility function (e.g., a button
utility).
○ Include and use this component in your main application.
○ Document the steps and any issues faced.

Day 3: Understanding ESP32 Microcontroller

Objectives:

● Learn about the ESP32 microcontroller features and specifications.


● Explore the ESP32 datasheet and technical reference manual.

Steps:
1. Difference between 8 bit and 32 bit controllers ? [1] [2]
2. Basic understanding of ARM architecture? (esp Cortex M)
3. Read the ESP32 Overview:
○ Explore the ESP32 Overview on the Espressif website.
4. Read the ESP32 Datasheet:
○ Download and read the ESP32 Datasheet.
○ Read about the different GPIOs, learn which are allowed to use.
○ Learn what are the different other techniques to program esp32 other
than ESP-IDF.
5. Read the Technical Reference Manual:
○ Download and read the ESP32 Technical Reference Manual.

Exercise:

● Microcontroller Report: Write a summary of the key features and specifications of


the ESP32 microcontroller, based on the datasheet and technical reference
manual.

Day 4: GPIO and Blink Example

Objectives:

● Learn about GPIO functionality on the ESP32.


● Implement a basic LED blink example.
Steps:

1. Read the GPIO Section:


○ Read the GPIO section in the ESP-IDF Programming Guide.
2. Implement the Blink Example:
○ Follow the GPIO Example in the documentation.

Exercise:

● Blink Example: Implement the blink example, modify it to change the blink rate,
and document the changes made.

Day 5: Exploring Espressif Documentation and Using ESP-IDF Examples

Objectives:

● Navigate and utilize the Espressif documentation effectively.


● Understand how to find and use information from the official documentation.

Steps:

1. Explore the ESP-IDF Programming Guide:


○ Navigate through the ESP-IDF Programming Guide and explore different
sections like peripherals, networking, and examples.
2. Explore API References:
○ Look into the API Reference for detailed information on different libraries
and functions.
3. Explore ESP-IDF Example
i. Navigate through the ESP-IDF examples repository.
ii. Study different categories like peripherals, protocols, and systems.
4. Search for Specific Topics:
○ Practice searching for specific topics or issues within the documentation
to familiarize with the structure and search functionality.

5. Adapt an Example:

● Choose an example relevant to your project or interest.


● Adapt and extend the example to meet a specific requirement.
Exercise:

● Documentation Navigation: Choose a specific topic (e.g., GPIO, I2C) from the
ESP-IDF Programming Guide. Write a short guide on how to use that feature,
including example code and references to the documentation.
● Custom Example: Choose an ESP-IDF example, modify it to add new features
or change its functionality, and document the changes made and any challenges
faced.

Learning Outcomes:

● Proficiency in Development Environment Setup:


○ Ability to download, install, and configure Visual Studio Code for ESP32
development.
○ Skill in installing and setting up the ESP-IDF development environment.
● Mastery of ESP-IDF Basics:
○ Understanding of the ESP-IDF structure and components.
○ Proficiency in using basic ESP-IDF commands (idf.py build, idf.py
flash, idf.py monitor, idf.py menuconfig).
○ Competence in creating, building, flashing, and monitoring new projects.
● Comprehensive Understanding of ESP32 Microcontroller:
○ In-depth knowledge of ESP32 features and specifications.
○ Ability to navigate and interpret the ESP32 datasheet and technical reference
manual.
● Practical Experience with GPIO:
○ Familiarity with GPIO functionality on the ESP32.
○ Ability to implement and modify a basic LED blink example.
● Effective Use of Espressif Documentation:
○ Skill in navigating and utilizing the ESP-IDF Programming Guide and API
Reference.
○ Ability to search for and apply information from the official Espressif
documentation to practical problems.

WEEK 2 TASKS

Day 1: Introduction to FreeRTOS

Objectives:

● Understand the basics of FreeRTOS.


● Learn to create and manage tasks in FreeRTOS.
● Go to the official freeRTOS documentation for explanation and understanding
freeRTOS.org.
Steps:

1. FreeRTOS Basics:
○ Study the FreeRTOS documentation to understand key concepts.
○ Focus on tasks, task scheduling, and task states.
2. Setting Up FreeRTOS on ESP32:
○ Read the ESP-IDF FreeRTOS API documentation.
○ Set up a basic FreeRTOS project in ESP-IDF.
3. Creating and Managing Tasks:
○ Learn how to create, delete, and manage tasks.
○ Study the usage of xTaskCreate, vTaskDelete, and vTaskDelay.

Exercise:

● Basic Task Example:


○ Create a FreeRTOS project where two tasks blink two different LEDs at different
intervals.
○ Document the process, code implementation, and any challenges faced.

Day 2: Using Timers

Objectives:

● Understand how to use hardware timers on the ESP32.


● Learn to configure and use the timer API in ESP-IDF.

Steps:

1. Read the Timer Section:


○ Study the ESP-IDF Timer API Documentation.
2. Configure a Timer:
○ Learn how to configure a timer using the API.

Exercise:

● Timer Example:
○ Implement a timer that toggles an LED every second.
○ Document the implementation process and any challenges encountered.

Day 3: Using Interrupts

Objectives:

● Learn how to use hardware interrupts on the ESP32.


● Understand interrupt configuration and handling in ESP-IDF.
Steps:

1. Read the Interrupts Section:


○ Study the ESP-IDF Interrupt Allocation Documentation.
2. Configure and Handle Interrupts:
○ Learn how to configure GPIO interrupts.

Exercise:

● Interrupt Example:
○ Implement a GPIO interrupt that toggles an LED when a button is
pressed.
○ Document the steps and any issues encountered.

Day 4: I2C Communication

Objectives:

● Understand the I2C protocol and how to use it with ESP32.


● Learn to configure and use the I2C API in ESP-IDF.

Steps:

1. Read the I2C Section:


○ Study the ESP-IDF I2C API Documentation.
2. Configure I2C:
○ Learn how to set up I2C on the ESP32.

Communicate with an I2C Device:

● Write code to communicate with an I2C device (e.g., a sensor).

Exercise:

● I2C Example:
○ Implement a program that reads data from an I2C sensor(DHT, SHT30)
and prints it to console
○ Document the implementation process and any challenges encountered.

Day 5: Integrating Components, Timers, Interrupts, and I2C

Objectives:

● Combine knowledge of components, timers, interrupts, and I2C.


● Develop a comprehensive project that integrates these elements.
Steps:

1. Project Planning:
○ Plan a project that uses a custom component, timers, interrupts, and I2C
communication.
○ Example project: A temperature logger that reads data from an I2C
temperature sensor, uses a timer to log data at regular intervals, and
triggers an interrupt when a button is pressed to change the logging
interval.
2. Project Implementation:
○ Create and configure the necessary components.
○ Set up timers, interrupts, and I2C communication as learned in the
previous days.
○ Integrate all parts into a cohesive project.

Exercise:

● Comprehensive Project:
○ Implement the planned project.
○ Ensure all parts work together seamlessly.
○ Document the project, including the design, implementation steps, and
any issues encountered.

Learning Outcomes

● Component Creation and Configuration:


○ Ability to create custom components in ESP-IDF.
○ Skill in configuring CMakeLists.txt for components.
○ Proficiency in including and using components in the main application.
● Timer Configuration and Usage:
○ Understanding of hardware timers on the ESP32.
○ Skill in configuring and using the timer API in ESP-IDF.
● Interrupt Handling:
○ Proficiency in configuring and handling hardware interrupts on the ESP32.
○ Ability to implement and manage GPIO interrupts.
● I2C Communication:
○ Understanding of the I2C protocol and its usage with ESP32.
○ Skill in configuring and using the I2C API in ESP-IDF.
○ Ability to communicate with I2C devices.
● Integration of Multiple Concepts:
○ Ability to integrate custom components, timers, interrupts, and I2C
communication into a cohesive project.
○ Proficiency in planning, implementing, and documenting complex
embedded systems projects using ESP-IDF.
By the end of this week, you'll be able to create and configure components, utilize timers
and interrupts, implement I2C communication, and integrate these elements into
comprehensive projects, all while leveraging the official Espressif documentation.

WEEK 3 TASKS

Day 1: Advanced GPIO and PWM

Objectives:

● Learn about advanced GPIO functionalities.


● Understand and implement Pulse Width Modulation (PWM) using ESP-IDF.

Steps:

1. Advanced GPIO:
○ Study the ESP-IDF GPIO documentation.
○ Implement GPIO functionalities such as wake-up and edge detection.
2. PWM Configuration and Usage:
○ Study the ESP-IDF LEDC (PWM) API documentation.
○ Implement a PWM signal to control an LED brightness.

Exercise:

● PWM Example: Implement a PWM signal to vary the brightness of an LED.


Document the implementation and any challenges faced.

Day 2: ESP32 WiFi

Objectives:

● Understand Wi-Fi functionalities on the ESP32.


● Learn to configure and use Wi-Fi.

Steps:

1. Wi-Fi Basics:
○ Study the ESP-IDF Wi-Fi API documentation.
○ Set up an ESP32 as a Wi-Fi station and connect to a network.
2. Wi-Fi as Access Point:
○ Study the ESP-IDF WiFi AP documentation.
○ Set up an ESP32 as an WiFi access point and connect your mobile or
computer with it.
○ You can use the ESP-IDF examples.
Exercise:

● Wi-Fi Connection Example: Configure the esp32 in both Station and Access
Point mode and try to connect with it. Document the process and any issues
faced.

Day 3: UART Communication

Objectives:

● Understand the basics of UART communication.


● Learn to configure and use the UART API in ESP-IDF.

Steps:

1. Read the UART Section:


○ Study the ESP-IDF UART API documentation.
2. Implement UART Communication:
○ Explore the three UART examples provided in ESP-IDF: uart_echo,
uart_events, and uart_async_rxtxtasks.
○ Implement and test each example.

Exercise:

● UART Examples:
○ Test uart_echo, uart_events, and uart_async_rxtxtasks
examples.
○ Document the setup, execution, and performance of each example.
○ Compare the examples and determine which one is better suited for
specific scenarios and why.

Day 4: FreeRTOS Advanced (Task Scheduling and Queues)

Objectives:

● Understand FreeRTOS task scheduling.


● Implement FreeRTOS queues for inter-task communication.

Steps:

1. Task Scheduling in FreeRTOS:


○ Study the FreeRTOS documentation on task scheduling.
○ Understand different scheduling policies and task priorities.
2. Queues in FreeRTOS:
○ Study the FreeRTOS documentation on queues.
○ Understand how to create a queue, send data to a queue, and receive
data from a queue.
○ Learn to use xQueueCreate, xQueueSend, and xQueueReceive.

Exercise:

● Task Scheduling Example:


○ Create a FreeRTOS project where two tasks with different priorities toggle
two different LEDs. Observe how the task priorities affect the scheduling.
○ Document the process, code implementation, and any challenges faced.
● Queue Example:
○ Create a FreeRTOS project where one task sends data to a queue, and
another task reads from the queue and processes the data (e.g., toggles
an LED based on the received data).
○ Document the process, code implementation, and any challenges faced.

Day 5: FreeRTOS Semaphores and Mutexes

Objectives:

● Learn to use semaphores for task synchronization.


● Understand and implement mutexes for resource management.

Steps:

1. Semaphores in FreeRTOS:
○ Study the FreeRTOS documentation on semaphores.
○ Understand how to create binary semaphores and use them for task
synchronization.
○ Learn to use xSemaphoreCreateBinary, xSemaphoreGive, and
xSemaphoreTake.
2. Mutexes in FreeRTOS:
○ Study the FreeRTOS documentation on mutexes.
○ Understand how to create mutexes and use them to protect shared
resources.
○ Learn to use xSemaphoreCreateMutex, xSemaphoreTake, and
xSemaphoreGive.

Exercise:

● Semaphore Example:
○ Create a FreeRTOS project where a task waits for a semaphore to be
given before proceeding with its execution (e.g., a task waits for a button
press to toggle an LED).
○ Document the process, code implementation, and any challenges faced.
● Mutex Example:
○ Create a FreeRTOS project where multiple tasks try to access a shared
resource (e.g., a UART peripheral or any other resources such as sensor
data). Use a mutex to protect the resource from concurrent access.
○ Document the process, code implementation, and any challenges faced.

Learning outcome:

● Advanced GPIO and PWM:


○ Mastery of advanced GPIO functionalities including wake-up and edge
detection.
○ Proficiency in configuring and using PWM to control LED brightness.
● ESP32 WiFi:
○ Comprehensive understanding of WiFi functionalities on the ESP32.
○ Ability to configure the ESP32 as both a WiFi station and an access point.
● UART Communication:
○ Strong understanding of UART communication principles.
○ Practical experience with different UART examples (uart_echo,
uart_events, uart_async_rxtxtasks) and their applications.
● FreeRTOS Task Scheduling and Queues:
○ In-depth knowledge of FreeRTOS task scheduling, including different
scheduling policies and task priorities.
○ Proficiency in using FreeRTOS queues for inter-task communication.
● FreeRTOS Semaphores and Mutexes:
○ Expertise in using semaphores for task synchronization.
○ Ability to implement mutexes to manage resource access and protect
shared resources in FreeRTOS applications.
WEEK 4 TASKS

DAY1

DAY2

DAY3

DAY4

DAY5

WEEK 5 TASKS

DAY1

DAY2

DAY3

DAY4

DAY5

WEEK 6 TASKS

DAY1

DAY2

DAY3

DAY4

DAY5

WEEK 7 TASKS

DAY1
DAY2

DAY3

DAY4

DAY5

WEEK 8 TASKS

DAY1

DAY2

DAY3

DAY4

DAY5

You might also like