Skip to content

bootcamp

Topic(s) of this week

Today it is 2024-01-17.
What a beautiful day it is today. A bit early to get on the train, but still. This is the kickoff of my Fabacademy adventure at Amsterdam WAAG. We’re going to introduce ourselves, go over what to expect and maybe already start to do cool stuff.

Instructor team

Henk - Fablab Waag wizard
Michelle - textile, electronics
Erwin - electronics
Bas - programming
Saco - mechanical engineer

Planning

  • Wednesday
    • 12:00h local review until 14.
    • 14:00-15:00h 1 hour to get home.
    • 15:00h - 18:00h Neil lecture time
  • Thursday
    • 7:24h train leaves
    • 10:00h be at Waag Amsterdam
    • 18:00h end of the day. Maybe.

other important things

  • Build-a-machine week: be at Waag From march 27 until April 10!
  • Recitation on Mondays: not mandatory. A talk about a topic related to that weeks subject. Will be recorded as well so can be watched later.

Documentation

Documentation is essential. If not documented it did not happen. All documentation will have to go on fabacademy gitlab. If not it did not happen. And photos and videos will have to be compressed.
Best advice re: documentation came from Erwin: Keep one documentation source as “The One”.
I will do documentation on multiple devices. On my iPhone (quick notes during travelling and meetings), on my company Windows laptop, maybe even on my private Macbook. So sync is a requirement. And let’s use my Windows laptop to compress and push to git.

Copilot AI: The phantom from the phantom of the opera holding a phone in one hand and a laptop in the other. He is pretending to sing the opera with big gestures.

Onenote

I want to document in onenote. I’m just used to it. My organisation if fully into Microsoft and it might be best to stick to supplied tools where ever possible.

I’d like to export it to markdown language for easy committing to gitlab. I found this: https://gitlab.com/pagekey/edu/onenote-to-markdown

I needed to use pip but windows didn’t allow me to. I got a “Access is denied error”. A quick google search got me to use the “command python -m pip” instead. #fail

Procedure to install this onenote-to-markdown:

  • Download pandoc at https://pandoc.org/. This is a document converter.
  • Copy the content of the zip file to c:\pandoc
  • Add pandoc folder to windows environment path
  • Windows start -> search environmental variables
  • Click environment variables button
  • Go to Path (in system variables)
  • Click new
  • Add C:\\pandoc
  • Test in cmd if it works
  • Download zip from pagekey gitlab
  • Copy files to c:\onenote-to-markdown
  • In terminal go to this folder and run python -m pip install -r requirements.txt

Usage:

  • Open OneNote and ensure the notebook you’d like to convert is open.
  • Run the script: python convert.py
  • Find your converted notes in ~/Desktop/OneNoteExport. Commit this to Git.

This actually works quite OK. It converts onenote to a Word file (docx) and next converts this docx file to markdown.
but
As all things Microsoft Word, I fear the markdown will be completely bloated with styling stuff. So I will just have to get notes in markdown immediately.

Obsidian notes

After discussing with Erwin he pointed me to Obsidian notes.

  • Free for personal use
  • Can sync to iCloud
  • has an iOS app
  • has a Windows app
  • Can deal with pasted images and videos
  • iOS app can add images and videos which will sync as well

So that’s why these notes are created in Obsidian. And that’s what I’m going to try. Looking good so far!
Obisidian allows for great customization. That’s needed, because I want to be able to do as little “clean-up and cosmetic” work afterwards as possible. See my Obsidian-cheatsheet for settings and more.

Git it (fabacademy gitlab)

Documentation will have to be commited to fabacademy gitlab. But first all images and videos will need to be compressed. For that I need to create a script that I can run that first compresses all images and videos and then commits them to my git repository.
Next up would be to create a readme.mk with info about me and links to all weeks + Final Project pages.
To render all markdown pages into static HTML, I’m going to investigate which render engine to use and investigate if I want to run this locally as well as on gitlab. Obsidian renders markdown, so not sure if this is needed.

Compress

Compress photos and videos before uploading/committing to gitlab and not after that. Because once uploaded in git it will be in your git history. Forever.
Compressing is done using ffmpeg (video) and imagemagick (images).

imagemagick

To install:
download from https://imagemagick.org/script/download.php and install.

on linux:

sudo apt update
sudo apt upgrade
sudo apt install imagemagick

FFMpeg

  • download from https://www.gyan.dev/ffmpeg/builds/
  • Unpack, copy files to c:\ffmpeg
  • Windows start -> search environmental variables
  • Click environment variables button
  • Go to Path (in system variables)
  • Click new
  • Add C:\ffmpeg\bin\
  • Test if cmd if ffmpeg works

on linux:

sudo apt update
sudo apt upgrade
sudo apt install ffmpeg

PCB Software

I’m familiar with Autodesk Fusion 360 and Altium to design PCBs. I never tried kiCAD so this is my change. I intend to use kiCAD throughout Fabacademy to design my PCBs.
To install kiCAD and Fabacademy library:

  • Download and install from https://www.kicad.org/download/
  • Download and save Fabacademy library https://gitlab.fabcloud.org/pub/libraries/electronics/kicad (click code -> download to zip)
  • Unpack and copy kicad-master folder into C:\Users\%yourusername%\Documents\KiCad\fabacademy library
  • In kicad:
    • Go to “Preferences / Manage Symbol Libraries” and add fab.kicad_sym as symbol library. It’s the disk icon and then select fab.kicad_sym from the fabacademy library folder.
    • Go to “Preferences / Manage Footprint Libraries” and add fab.pretty as footprint library. It’s the disk icon and then select the folder fab.pretty.
    • Check if these libraries work by adding a symbol into a schematic and see if there’s a fab folder in the library. Also check the same thing by adding a footprint to a pcb.

Programmers

Microcontrollers are the magic. But need programming. For that you’ll need a programmer. So we soldered and programmed all the programmers we’ll ever need.
more info on these programmers: https://pub.fabcloud.io/programmers/summary/


Order of programmers:
Leftmost = JTAG https://en.wikipedia.org/wiki/JTAG
Middle = UPDI https://en.wikipedia.org/wiki/AVR_microcontrollers & search UPDI
Rightmost = FTDI https://en.wikipedia.org/wiki/FTDI - USB to TTL converter

Here we go!

Soldering the programmers:

Programming the programmers (Henk doing his wizardry):

Various

Programmer cases

This week I’ve created cases to protect the programmers. See here for its documentation.

things to lookup

www.Nerdland.be -> nice podcasts about standards

Adrian Torrez fabcloud: has documentation and designs of several breakout boards.
Fabacademy programmer: Xiao (rp2040) -> program ISP, jtag, SWD, UPDI (1 pin programmer),  etc.
Seeeduino XIAO is the smallest Arduino compatible board in Seeeduino Family. It is an Arduino microcontroller that is embedded with the SAMD21 microchip. http://fabacademy.org/2020/labs/leon/students/adrian-torres/fabxiao.html

Survive fabacademy

I watched the whole series youtube.com/watch?v=KZZtqvUVykc. Well done https://www.fablabs.io/users/francisco!

Check how others did their documentation

I wonder how others do their documentation. Should I do it like a diary? With nice sentences? Or more like staccato notes? I know I shouldn’t just make a howto list.

pull request Github

I’m going to do a pull-request to improve the working of the Wrangle-Todos community plugin of Obsidian. Never did a pull-request, so would be interested to see how that goed. I’ve asked Copilot AI to explain to me what I will have to do.

prompt

if a GitHub users asks me to create a PR for a feature that I’d like to see in their software, what should I actually do and how should I do that?

answer

If a GitHub user asks you to create a pull request for a feature that you’d like to see in their software, you can follow these steps:

  1. Fork the repository: Forking a repository creates a copy of the original repository in your GitHub account 1. You can make changes to the forked repository without affecting the original repository 1.

  2. Clone the forked repository: Cloning a repository creates a local copy of the repository on your computer 2. You can make changes to the local copy and push the changes to the forked repository 2.

  3. Create a new branch: Creating a new branch allows you to work on a new feature or bug fix without affecting the main branch 1. You can create a new branch using the command git checkout -b new-branch-name 2.

  4. Make changes: Make the changes you’d like to see in the software 1. You can use your preferred text editor or integrated development environment (IDE) to make the changes 2.

  5. Commit changes: Committing changes saves the changes you made to the local repository 1. You can commit changes using the command git commit -m "commit message" 2.

  6. Push changes: Pushing changes uploads the changes you made to the forked repository 1. You can push changes using the command git push origin new-branch-name 2.

  7. Create a pull request: Creating a pull request allows you to propose changes to the original repository 1. You can create a pull request by navigating to the forked repository on GitHub.com, clicking on the “Pull requests” tab, and then clicking on the “New pull request” button 1. You can then select the branch you created in step 3 as the “compare” branch and the original repository’s main branch as the “base” branch 1. You can add a title and description for the pull request, and then click on the “Create pull request” button 1.

Here is an example of how to create a pull request using the command line interface:

# Fork the repository
# Replace <username> with your GitHub username
git clone https://github.com/<username>/repository-name.git

# Clone the forked repository
cd repository-name
git clone https://github.com/<username>/repository-name.git

# Create a new branch
git checkout -b new-branch-name

# Make changes
# Use your preferred text editor or IDE to make changes

# Commit changes
git commit -m "commit message"

# Push changes
git push origin new-branch-name

# Create a pull request
# Navigate to the forked repository on GitHub.com
# Click on the "Pull requests" tab
# Click on the "New pull request" button
# Select the branch you created in step 3 as the "compare" branch
# Select the original repository's main branch as the "base" branch
# Add a title and description for the pull request
# Click on the "Create pull request" button

Result

This didn’t work. Obviously. How could I’ve thought that the very first git commit in my life would work. The error: nothing to commit, working tree clean.
I learned that checkout -b means that you’re going to checkout to a new branch. You can create the branch manually as well with git branch new-branch-name but checkout -b new-branch-name is faster.
I found out that I forgot to git add the file before committing. You can also use git add . and git add -all. This works! Creating the pull request was easy. I linked the pull request to the issue that I started by simply adding #4 to the change request comment (where 4 is the actual issue number).
So the procedure is:

# Clone the forked repository
cd repository-name
git clone https://github.com/<username>/repository-name.git

# Create a new branch and checkout in one go
git checkout -b new-branch-name

# Make changes in preferred text editor an save

# Add the changed files to the commit stack
git add .
# or
git add -all

# Commit changes
git commit -m "commit message"

# Push changes
git push origin new-branch-name

What I learned this week

Successes

Git works! I even did a Git Pull request :-)

Fails & Fixes

Windows. A well, you’ve got to work with what is provided to you. But I’m sure this will be bugging me for the coming weeks. One fix was to install windows terminal and use powershell instead of command prompt.
Python on windows didn’t work properly until I started to use py -m <python command>. That worked fine.

Remember this for next time

py -m everything :D