Shenzhen I/O #1 - Security Camera

A few days ago I tried out SHENZHEN I/O. It is some kind of puzzle game in which you need to solve little tasks using assembler and programming a microcontroller. The solution is then ranked in three categories and compared to friends: Product Cost: depends on the hardware you did choose Power Usage: Is increased with more complex and expensive commands Lines of code There is no tutorial. All you have is a 50 sheet documentation about the chips an the commands....

February 24, 2021 · 2 min · 315 words · Robert

Advent of Code Day #6

Day 6 is again pretty nice to solve with Ruby. Today it is all about customs declaration. We again have different groups seperated by a newline containing multiple lines with characters. Each line represents a person and each character represents a different question answered with “yes”. abc a b c ab ac a a a a In this example we do have four groups of people. The first group only has one person which answered three questions....

December 6, 2020 · 2 min · 328 words · Robert

Advent of Code Day #5

Day five is all about the airplane seating. One seat it represented by something like this: FBFBBFFRLR. The first eight characters are for the row, the last three for the seat. Part 1 We need to find the highest seat id to solve the first part. The seat id is calculated with: row-id * 8 + column. For the rows you start with a range of 0 to 127. F means use the first half B means use the last half With this in mind you need to iterate over the first eight characters to get your seat....

December 5, 2020 · 2 min · 263 words · Robert

Advent of Code Day #4

In day 4 we need to deal with passports (yay!) and check if they are valid for given criterias. The passworts do have multiple fields (key:value) and are divided by a newline. ecl:gry pid:860033327 eyr:2020 hcl:#fffffd byr:1937 iyr:2017 cid:147 hgt:183cm iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 hcl:#cfa07d byr:1929 hcl:#ae17e1 iyr:2013 eyr:2024 ecl:brn pid:760753108 byr:1931 hgt:179cm The fields are given and expected like so: byr (Birth Year) iyr (Issue Year) eyr (Expiration Year) hgt (Height) hcl (Hair Color) ecl (Eye Color) pid (Passport ID) cid (Country ID) Splitting them into “passports” is as easy as it gets....

December 4, 2020 · 2 min · 255 words · Robert

Advent of Code Day #3

In day 3 you have a ever repeating map with trees and free spaces. You move over this map and have to count how many trees (#) you will hit. Part 1 Given is a pattern in which you move right and down. In part 1 we start in the top left corner and always move 3 right and one down until we reach the last line. ..##.........##.........##.........##.........##.........##....... ---> #...#...#..#...#...#..#...#...#..#...#...#..#...#...#..#...#...#.. ....

December 3, 2020 · 2 min · 282 words · Robert