Activity

Arya

I got a basic working UI, am working on making it look better now. #IHateWebDev

Attachment
0
Arya

In this time period, I worked on making the main file for Prize Pics! What this file does is merges all the classes I worked on previously to make it all run coherently. This allows the minimal viability of this project – the display will for sure display any image in the queue. The next stage of development is making uploading the images easier. I am thinking about making a localhost server.

Attachment
Attachment
0
Arya

worked on implementing the full read -> process -> cache pipeline. This is the final thing I needed to implement before implementing a webpage for this. All the python functions I made now allows for the ability to 1) read an image from a directory 2) process it 3) display it, given the proper assembling of function calls. Super excited to build now. This test_trasnfer isn’t big itself, but I’m excited to see how it can implement with teh other functions to provide the overall functionality >:) (if i’m rambling this is because I want to finish this project tonight haha)

Attachment
0
Arya

In this, I developed teh slideshow algorithm! One of the main thigns I wanted to make sure that I could implement is that there would be a scrollign motion. What fun would it be if only one image is displayed? The major role of this class is to create a slideshow object that scans teh queue directory and itterates through teh images. This will allow us in teh future, then, to call the transform algorithsm on tehse images, and then the display algorithm on teh transformed images. I missed objected oriented programing (i did a project in C before this 😭)

Attachment
Attachment
0
Arya

I created the pipline script! I found some errors in my code that I fixed, it priamrily being spelling and naming conventions. However, the end result is that it did work, with me being able to put a test.png file in a queue directory and then it being processed and displayed on the e-ink. This is a huge huge huge milestone as its going to allow me abstract an algorithm that is in charge of just sorting the images, and this will take care of displaying em. I want the pictures to be shuffled, so I think ill implement a shuffle/slideshow next. Super excited this worked, though.

Attachment
Attachment
1

Comments

vitorgabrielventura.0

that’s looks good

Arya

In this session, I did the bulk of this project through creating the image developer. While my previous class allowed a 300x400 b/w image to be displayed, this algorithm creates that image. It does so with 2 main algoirhtms: resize_maintain_aspect and apply_dither. First, the user submits an image to which we resize. There might be a +- 1 px border because of floating poitn errors. Then, we apply contrast, brightness, and sharpness enhancements. After, we convert it to a greyscale image and apply the dithering algorithm. One thing I noticed is that there is no function for atkinson dithering in the Image class, so I created my own. More documentation on how it works is in the code comments. Overall, this was a really productive session: now by implementing a pipeline script, the user can submit an image -> this class is applied to output a 400 x 300 b/w image -> display_controller will display it. Very exciting.

Attachment
Attachment
0
Arya

I wrote a wrapper class to interact wiht the readme! I noticed a lot of functions to display on the e-ink had more stuff attached to it (i.e. time.sleep) and had more for error handeling. To fix these, I wrote a class that makes initializing, drawing, and clearing a lot more straight forward. This also makes sure that correct inputs are inputed, and raises errors if a user enters something not right (i.e. a not 400x300 image). After making it, I wrote a test script just to make sure it works, and it did! As always, I documented the tester in the tests_readme.md to make sure anyone who wants to itterate on this code has documentation avalible.

Attachment
Attachment
0
Arya

Created a test script for button functionality. I realized my board had a button I used as a shutter, which I could use to scroll between images. Before I implement that, thouhg, I want to make sure it actually works! The button is between gpio 18 and ground. To create this script, I enabled a pull up resistor between gpio 18, so that whenever the button is pressed, the pin reads low and not high. This allows for a while(true) script that whenver teh button is pressed, the pin reads low, and then the terminal id displayed with “button pressed” and a count. Afterwards, I made sure to document htis function in the test readme.

Attachment
Attachment
0
Arya

I created a lightweight e-ink test script! I noticed that the waveshare one, while it works, is a lot. Because of that, I created a script to test the display.The main things it tests for are 1) clearing 2) displaying PIL objects 3) putting it to sleep. After I wrote it and tested it on my end, I wrote documentation on how to use it so that if a user needs to test thier hardware, they can just use the repo and not have to search outside.

Attachment
Attachment
Attachment
0
Arya

Added a requirements.txt for easier install of all dependencies. This will make sure that the end user will be able to install everythign quickly with one CLI command. I belive I have everything ready to start making some scripts >:)

Attachment
0
Arya

Found a way to clone my repo onto my rpi and cloned the waveshare libraries into my library folder! This allows me to sync my code between my RPi and mac so I can code on my mac, and then test the code using SSH. I should probably makee a ssh_instructions.md haha, that is a later problem. For now, I have the libraries there so I can start writying the basic scripts to transform images into something I can display.

Attachment
0
Arya

In this part, I first started planning what I want this project to acomplish: display images on an e-ink from my phone. I find that having a planning.md file really helps me clear my head and focus on specific problems. After I jotted some ideas there, I started writing the firmware and hardware isntructions. These are nowhere near done (as I have not done much fo the coding yet!) but I have a basic idea of what the user needs to get started with. For isntance, I have a devboard for an e-ink device from an earlier project which I am going to use for my demo, and I outlined the parts needed to build that. However, becasue that uses an RPi 2ZW, which is slow, I am prototyping on my RPi 3b+ with an e-ink. Because I am prototyping on a new e-ink, I made sure that it was not a lemon through waveshare’s test protocols. I then found some errors in their documentation, so I made a comprehensive test instruction set under firmware_instructions.md. My next step is to clone my repo onto my RPi and start working on the components I’ll need (image processor, slideshow, ect…) and testing em out. I’m glad I set a solid foundation of what I need to work on in this block, so my following blocks are more productive :)

Attachment
0
Arya

Shipped this project!

Hours: 25.37
Cookies: 🍪 499
Multiplier: 19.66 cookies/hr

Imagine gaming on a mac (insert crying emoji). I love playing snake, but I don’t like the apple keyboard, so I made the world’s smallest gaming keyboard. In a 3x3 grid, there are WASD/Arrow, shift, escape, tab, space, and layer switch keys. Because I coded HID, there is no config or driver install needed–it’s plug and play.

I learend a lot in this project. Normally, I would do this in python becuase libraries but I really wanted to learn how 1) I2C communication worked between the MCU and OLED and 2) how USB communication worked between the MCU and host device. I learned wayy more than I can include here (everything’s commented on my repo though!), but I have gained a huge apprecaition for python libraries and not having to HARD CODE LETTERS AS BITMASKS. I also got an appreciation for CMake and how it made the compilation process easier. For my next project, though, I think I’ll use just Make because CMake was pretty slow. Overall great project, though, and it was a bunch of fun making it.

Arya

Cleaned up my git repo! This session was primarily to make my work presentable. I made my readme, which gives a breif overview of the project, and includes a demo video. I also wrote firmware and hardware isntructions if someone wants to recreate it.

Here’s the link to the demo video: https://youtube.com/shorts/ai6QLhHT9NE?si=4pOMcnLnvPT2tYLt

Attachment
0
Arya

There were a couple of errors, but they were fairely minor. The main thing is getting used to C syntax–I normally work in python, and I forgot to add some semicolons here and there. Additionally, the OLED logic needed some revision such that itll work on a 128x32 display. Overall not too much work. Here’s a breif video demo–I’m going to be making a nicer video (and documenting it!) in the new year.

1

Comments

Oignon
Oignon about 2 months ago

The transition from high-level to low-level is tough (:

Arya

Wrote main.c! Hopefully this is the last major update–in this document, I call all the methods I wrote >:). This made things a bit easier, becasue the hard part is done, now we get to work at the high level. One thing I noticed is that the physical orientation of my hardware looks better 90 degrees CCW, so I implemented that through creating logic that transforms the physical orientation to a logical orientation, and then performs action based on the logical orientation. Now time to compile and test!

Attachment
0
Arya

mega devlog again! In this session, I coded the implementation of tinyusb. This was a big learning experience, becasue I havn’t worked with this yet. Thankfully, the documentation for this is very clear, and there are numerous implementations online. The first part of implementing this is writing teh config file, which tinyusb in CMAKE will read to compile the other usb files. Then I made the interface for USB HID, which makes sure that the rp2040 gets read as a human interface device. This wasn’t too bad because of online documentation. The usb descriptor file got written last, because that imported all 3 of the files before. In this file, it was just writing the algorithms that allow the target device to exchange information with the rp2040. The tinyusb stack was especially important here, since this file was mainley understanding the enumuration process.

I belive most of this code can be reused in future projects, however, the tinyusb config might need to be changed to accomodate what usb feature the project intends to do. One thing I really admire about this protocol is how they made it lightweight through only installing the packages needed for the specific implementation: i.e., in my device, I don’t need code for MIDI.

Attachment
Attachment
0
Arya

Figured out how tiny usb works! I wrote tusb_config.h, which oversees the configuration of all the different drivers. Ultimatly, the msot important bits of code were setting the buffer size and enabiling the HID driver. This was definelty a process, though: I was coding while reading teh documentation, so it took a bit of time. In the comments, I documented what each function does, so it should be easier to port into another project. From my understanding, CMAKE will interpret this file and encode the tinyusb features.

Attachment
0
Arya

okay mega devlog. In this log, I have made the interface and functions to communicate with an OLED using I2C. Big shout out to adafruit for linking the docs for the 1306 chip on my oled. The first thing I did was make the font for the letters I would use. I realized there wasn’t a library, so I hardcoded each letter as an array of 5 numbers, which when in binary show the letter. I then implemneted algorithms for I2C, such as teh start, stop and write. Then I wrote helper functions for commands and data. Then i wrote the initilaization script (which took the longest) where I had to use low-level commands for the oled to work. I scraped most of tehse from the documentation. I then moved a tad more abstract, where I implemneted clearing, updating, and drawing algorithms. In this process, I think the biggest thing I learned is how I2C works; before I just imported a python library haha. I made sure to add comments such that this code can be re-used for later projects. I think the next thing I will be workign on is the USB HID, which hopefully won’t take this long.

Attachment
0
Arya

wrote the encoder interface and methods! Most of the time was to figure out how to represent the encoder rotations. I created an 8 bit variable that tracks the old and new state. States are determined per a lookup table I constructed by creating change between [00, 01, 10, 11] by itself. The result was 16 possible outputs for which way the rotation could be. The first method I made was a static method that updated the encoder state and encoder delta. Then, I realized i forgot to initialize it (haha) so I made that and used callbacks to not have to do a while(true) polling loop.

Attachment
1

Comments

Eternal
Eternal 3 months ago

pov: i get hit by imposter syndrome looking at your code

Arya

I think I wrote the bulk of the matrix logic! To represent the 9 keys, I chose to implement a bitmask structure where the position of a “1” indicates which key is pressed. Finished most of the code for matrix.c and wrote its interface.

Attachment
0
Arya

wrote the config based on my PCB schematic! I chose to use my macropad project that I made earlier because I did not want to order and wait for a pcb. In a future itteration may change that, and will change the key morphology accordingly. But for now, we are working with a 3x3 switch grid and an encoder. the config file is just defining constants that we’ll use in the project, such as which gpio pins each row/col are, how much the debounce is, ect… Now time to code the header files with which functions I anticipate I’ll need!

Attachment
1

Comments

Slugarius
Slugarius 3 months ago

ts tuff

Arya

wrote the pico_SDK_import.cmake! big shout out to reddit shich helped a ton with the algorithm! I hope this helps others bc now the whole sdk import algorihtm is compiled. This should be copy-pastable into other projects (assuming it works (it probbaly dosnt but debugging shouldnt be that bad))

Attachment
0
Arya

Wrote the CMakeLists.txt!

Something more I want to accomplish with this project is making hardware coding more accessible. To do this, I wrote comments under each line outlining what it does. I remember when I first got into hardware coding, it was challenging because you had to know a lot just to get started. I want to make that process easier.

Attachment
0
Arya

Shipped this project!

Hours: 12.8
Cookies: 🍪 344
Multiplier: 26.89 cookies/hr

In this project, I created an accessible linear algebra calculator with a CLI design. It works very much like a command line–the user interacts through entering commands. The user can declare matricies, perform operations on those matricies, and store those results. Because of the functional design, commands can be stacked on top of each other. The textual input makes inputing matricies significantly faster.
In building this, the primary takeaway is how to abstract algorithms. For instance, I knew how to do these operations by hand, but it took a bit to translate that into code. I also learned more about web dev and how to host a site on vercel.

Arya

wrote the readme!

Attachment
0
Arya

hosted this on vercel! This is fully working! The UI is not the best, but the algorithms work! All the code for them is in the github. Below, I just show some of the operations; there are 22 operations total.

0
Arya

mildly better UI

Attachment
0
Arya

worked on creating a web-app implementation of it… it’s a work in progress

Attachment
0
Arya

am exploring how to use Pyodide to port my python code into a web interface. This is what my prototyping looks like so far:

Attachment
0
Arya

Overall I think all the functions are done. I now added some input validation functions that raise errors when the user inputs something unexpected, to help with error handeling.

Attachment
0
Arya

wrote my last function: change of basis! Now I will work on cleaning up the printers, and sketching a basic UI.

Attachment
0
Arya

I implemented col space! This allows to find the inputs of a transformation. Now I will work on row space.

Attachment
0
Arya

I was having some problems with making devlogs, so heres a bulk one for the last 7 hours! tldr, in the past 7 hours, I was able to write the majority of functions for my lin alge calculator! Now I am working on diagonalization. I wanted this to be lightweight, so I am not using any external libraries.

Attachment
0