ROB 502: Programming for Robotics: Class 8.5 Clicker Questions
Clicker Questions
- How many bits are in a byte?
- How many bytes are in a
uint16_t
? - What is 164 in hexadecimal?
- What is 87 in hexadecimal?
You have a 5 by 5 image buffer of 24-bit bgr pixels.
- How many bytes large is this buffer?
- What is the index of the coordinate (4, 2)?
- What is the index of the coordinate (2, 4)?
- If the buffer had type
uint8_t
instead of "24-bit bgr pixel", what would be the index of the blue component of the pixel at (4, 2)? - If the buffer had type
uint8_t
instead of "24-bit bgr pixel", what would be the index of the red component of the pixel at (2, 4)? - On a 32-bit computer, what is
sizeof(uint64_t *)
? - On a 32-bit computer, what is
sizeof(uint64_t)
?
Homework 2 note
I have added a note to the document about how I organize my collision code!
// slightly modified from homework 1, they provide a single function
// bool check_collides(vector_xy_t *pg1, vector_xy_t *pg2);
collision.c
collision.h
I also want to give a shout out for a recent post on piazza:
In debugging braitenberg so far, gdb has been invaluable. Here’s a link to the 10 minute CS50 video I watched to learn how to use it better. I promise it is well worth the time.