Stefan's journal
Sprint 1
OpenAPI
"I want to learn how to use a standard tool to create a professional API"
When creating an API, it is useful to have documentation so that other people know how to use it. In the individual project, I just wrote some text. For this project, I wanted to make my documentation more professional. To do this, I used OpenAPI (Swagger) which makes it possible to create structured documentation and include interactive examples. I learned how to use this based on the (pet) example given by the developers of OpenAPI.
The part I had the most difficulty with was getting the interactive element to work. The documentation website runs on the same host as the API, but not on the same port. And the server did not allow request from a different origin (CORS).
Passive buzzer
"I want to learn how to use a passive buzzer to place different sounds."
For the individual project, I used an active buzzer. Which can only play one sound. I wanted to learn how to play more than one sound. To do this, I looked up a tutorial online. I expected it to be more challenging than it was. To control the buzzer, you need to send it a square wave signal with the frequency of the sound you want to play. As it turned out, Arduino already has a built-in function to generator this signal. The tone() function. Which can be called with the pin-number the buzzer is connected to and the frequency you want to play.