Week 12

Tuva Oedegaard - Fri 29 May 2020, 9:50 am

Throughout this week I have worked on further assisting the group on getting everything together. We have discussed how to make things work, how our boards work differently and shared how we are doing it. And it works!

Imgur

I got some help from Sigurd on how to upload to Git through my cmd line.

Individual work

Thursday I worked on further improving the individual aspect of the ball. Firstly, I tried putting all the pieces inside of the ball, which turned out to be somewhat challenging. I talked to Sigurd and Thomas who have been working on an improved look and feel for the prototype, whether they think we would be able to use their solution. They said that their solutions have been difficult and perhaps not that rewarding to complete, so I ended up sticking with my Christmas ball for now.

While working with the ball, I also realised that the vibration sensor that Ben soldered for me two weeks ago did not work, it was falling apart. So although I have my thesis presentation today, I decided it was worth going into Uni to get that fixed, since this was the only opportunity this week. I got to uni and Ben soldered it back for me.

Before I went, I tried working on the next step of the prototype, the adjustment of the colours. I read about how to convert from rgb to hsl so that I could adjust the brightness and saturation. Sigurd provided me this, which was helpful to understand the topic https://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/. However, when playing with this, I realised that the solution I made last week might need some more working.

I used the map function to map the angle values from the accelerometer (using the MPU6050 tockn library), to values between 0 and 200 (255 is the rgb colour value but I didn't want them that bright). The issue was that I didn't know the range of the angle values. I had looked at these earlier and determined them to be roughly from -180 to 150, but now I saw that the z-values were around -1000! The z-values were mapped to how much blue should be displayed, which means this was always 0, and blue would be hard to achieve.

Imgur Imgur

I tried printing and playing with the values, as shown in the images.

I talked to Ben about how this could be fixed. He suggested using different libraries with more accurate values, but it didn't seem to have a meaningful effect. He also tried finding the range of the angle values, but wasn't able to. In the end, we talked about restricting the value of the sensor to be between -360 and 360, and then go up to 360 if it went below -360, to sort of create a loop. The main thing for me is to try to understand the maths and logic behind it, but I played around with that. I had to pack up before I got a finished result, but I made a function to check if the value was below of above -360/360. It ended up with the z-index always being -360, which didn't help that much. I have to fix that later.

I was going to visit some of my friends today, so I wanted to have a result, but I didn't have enough time this week. I will do this later.

Imgur Imgur