9-Input devices¶
Assignments¶
Group assignment:¶
- Probe an input device(s)’s analog levels and digital signals
- Document your work on the group work page and reflect on your individual page what you learned
Individual assignment:¶
- Measure something: add a sensor to a microcontroller board that you have designed and read it.
Learning outcomes¶
- Demonstrate workflows used in sensing something with input device(s) and MCU board
The road map i made for this week can be accesed here
Group Assignment¶
For this assignment, we were tasked with checking an input device(s)’s analog levels and digital signals
You can ciew our group assignmenthere
Reflection
Individual Assignment¶
- Measure something: add a sensor to a microcontroller board that you have designed and read it.
The input device I decided to work with for this week is a untrasonic sensor, because I’ll be using it for my final project. For this week i’ll be trying to make the led glow more with the distance measured from the ultrasonic snesor.The led will turn on when you reach a certain distance .
This is how my microcontroller looks like
Now, for the coding part of the process,I’ll be using arduino IDE
Arduino¶
Downloading the library¶
Go to tools- boards- boards manager(an alternative for this is also sketch-include library- manage library. Both lead to the same page)
Afterwards, you should access this.When you do, download the library you need.
After the library you need is downloaded, then you can access it by following the firzt steps, tools- boards- the board you’ll be using.
Since i’ll be working with a xaio board, the library i installed was for the xaio.
Example code¶
When you want to access an example code, these are the steps you follow.File-examples-the code you want.
These are the steps to use an example code, but for this project, I refrenced a different code instead.
Microcontroller making¶
This was the first scematic I made. I didn’t really understand what was going on properly though, so I decided to rearrange it a bit more to get the layout of how I wanted my pcb to be.
(Mid way, I also made a circuit board with only the pins required for this week, but I didn’t use it in the end)
note: When making scematics, the dot on line interconnections show that the component is connected to the pin of that wire.
This is how the pcb for my board turned out int he end!