User:Markvandenheuvel/prototyping

From XPUB & Lens-Based wiki


Prototyping Session 01 (with Andre)

date: 16-09-2019
pad: https://pad.xpub.nl/p/prototyping-20190916

UNIX

UNIX is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center. The OS made it possible for a lot of users to interact with a single machine at the same time. Before, this was done by a batch process via an operator/administrator.

Rasperry Pi

Raspberry Pi is a small single board computer used for learning basic computer science.

Rasperry Pi

Basic tasks & experiments:

  • Logging into the Raspberry Pi
  • printing with Matrix printer, ascii word-art generator (more), text-to-speech
  • creating public_html directory and index.html on the Sandbox (note: remote login not possible)
  • modifying texts (bio) through Terminal using Dadadodo and SED (changing and replacing certain characters)
  • working with Unix HTML - editor: ne nice editor
  • chaining programs a.k.a PIPING (command: |) / concatonate files (command: CAT)


IP adres of the Pi:

145.24.139.127

Copying files from personal machine to Sandbox:

scp file.txt username@145.24.139.127:/home/username

other useful & interesting links


Prototyping Session 02 (with Andre)

date: 30-09-2019
pad: https://pad.xpub.nl/p/prototyping-20190930

  • Basic tasks & experiments:
  • Creating and configuring personal Keys (passphrase) for R-Pi
  • Introduction to GIT and working with repositories

How to work with GIT & repositories in UNIX

A git project will have a parent folder on your local machine or remote (R-Pi)
View Pad for step-by-step Q&A for troubleshooting.

Command to initiate GIT:

  • git init stating the GIT program in your folder (makes a git. Folder)

Command to make GIT track your project:

  • git status shows in red what isn’t tracked and in green what is tracked
  • git add <file name>- starts tracking that file or files
  • git commit -m “add comment about what changes were been made” saves the version in the .git folder

> HEAD / MASTER: https://stackoverflow.com/questions/4386959/difference-between-head-and-master

  • git diff <file name> shows what has been change since previous commit
  • git checkout -- <file name> deletes the changes that where made and comes back to the last commit
  • git add -u will add all the tracked ones
  • git reset HEAD <name of file> Undo a commit
  • git log shows the commits

Publishing on XPUB GIT

1. Create a new repository
2. When you create it gives instructions (choose SSH in the toggle)
3. git push is pushing (publishing) to git website

Pushing from git to raspberry pi

- For now raspberry pi will just host our website
- On the git website we see the published file in dashboard
*** sudo let’s you install thing on pi- sudo apt install <software name> ***
*** sudo su- you can be someone else ***
use HTTPS link (top right)
Command to clone to pi:
git clone <HTTPS link> name the new folder

Work flow

  • Clone to your computer the folder from GIT (with the ssh url)
  • Then pull changes from the GIT
  • Or push changes back to the GIT

Git with others

How do I clone a repository from git.xpub.nl?

git clone (link)

Make your changes and commit

git commit -m 'added new quote'
git commit -a -m 'edited links'

How publish my commit back to the "remote"?

git push 

How do I avoid conflicts?

git pull origin master

How do I deal with conflicts?
Merge conflicts can happen when you are about to push your commit, however git is not able to merge you commit into the remote, probably because another collaborator was also working on the same file.

Specials issues website


Prototyping Session 01 (with Michael)

date: 02-10-2019
pad: https://pad.xpub.nl/p/prototypingm01


Topics & experiments:

  • Evolution of binary code (Boolean algebra, A Mathematical Theory of Communication)
  • Human calculator experiment (binary computation reconstructed by students)
  • AND gates, OR gates,NAND gates
  • Generating low oscillating frequencies and adding them to the Meergranen in Audacity to modulate other modules
  • Clapping music: approaching programming this piece of music with Arduino

links


Pads

Session 1: https://pad.xpub.nl/p/prototyping-20190916
Session 2: https://pad.xpub.nl/p/prototyping-20190930
Session 3: https://pad.xpub.nl/p/prototypingm01