- Syntax
- Read and control digital and analog I/O
- Print to the Serial Monitor and Serial Plotter
- Read from the Serial port
- Create and use global and local variables
- Why use constants?
- Use if statements
- Use while loops
- Use for loops
- Create and use functions
- Basic use of Arrays
- Pass-by-reference
- Concepts
- Edge detection
- Debouncing
- Non-blocking code
- Mapping function
- Enums
- Parsing and Serialization (Json and CSV)
- The value of using standardized protocols
- Sending multiple values over a text based protocol
- Abstraction and normalization of transmitted data
- Removing challenges that would otherwise cause some features not to be implemented
- Demonstrate the drawbacks of using a text based protocol
- Overhead causing a slower system
- Used for
- The value of using standardized protocols
- Communication
- Serial (SPI)
- Esp Now
- I2C
- MQTT
- WiFi (Esp32)
- Node-Red (Webserver)
- Dicipline
- Finding documentation and example code
- Debugging and reading other peoples code
- Debugging broken logic
- Locate the entrypoint of the program
- Track down the flow of the program function by function
- Add
Serial.println()
to see where the code fails
- Debugging error messages
- Locating the error message in the stacktrace
- Considering whether the error might be caused by a different line than the error message suggests
- Googling the error
- Recognizing what solutions may look like
- Typically in the form of a question at the top of a forum post, where the useful info is usually branded as "solution" or upvoted by many.
- Recognizing what solutions do not look like so time is not wasted
- Skimming through the solution to see if it makes sense
- Debugging broken logic
- Following style guides and conventions
- Setting expectations for what different code looks like
- Easier to make assumptions to save time
- Being able to trust variable and function names and naming schemes to inform about what the code does
- Setting expectations for what different code looks like
- Code splitting
- Function names should in most cases be enough to understand what the code does
- If not, split the function into smaller functions
- Function names should in most cases be enough to understand what the code does
- Solving one problem at the time
- Demonstrate conplex problems that are not possible to solve for a novice without practicing this principle
- Testing code early and thoroughly
- Ensure one has a solid foundation before continuing, to avoid having to go back and fix bugs later in a more complex system.
- Architecture
- Structs
- What they should learn
- Why use structs?
- How to use structs for grouping variables and functions
- When not to use structs
- Highly interconnected code
- What they should not learn
- The term "Object Oriented Programming"
- Constructors
- Member visibility (Private and Public)
- Inheritance
- Overriding
- Overloading
- These concepts make up all the complexity of OOP, as well as all the pitfalls. They will not be needed in this course.
- What they should learn
- Creating functions that update globals, instead of returning the result
- This makes the code more scalable (Mostly applies to the Arduino framework)
- Subdividing problems and creating isolated systems to deal with them one by one
- Structs