Proximity sensors implemented
Arduino interface with LEDs implemented
Integration in progress
Proximity sensors implemented
Arduino interface with LEDs implemented
Integration in progress
Worked on figuring out programming the LED matrix and figuring out how to integrate the matrix onto the jacket.
In order to reduce memory usage on the Arduino, there had to be some clever tricks used to minimize the representation of the matrix images.
// bit representation of signal image on matrix left_turn[] = { 0B1000000000000001, 0B0100000000000010, 0B0010000000000100, 0B0001000000001000, ... } void show_matrix (uint16_t M[], int r, int g, int b) { int curr_led = 0; for (int col = 0; col < WIDTH; col++) { uint16_t curr_bitvec = M[col]; uint16_t mask = 0B0000000000000001; for (int row = 0; row < HEIGHT; row++) { if (curr_bitvec & mask == 1) { leds[curr_led] = CRGB(r, g, b); } else { leds[curr_led] = CRGB(0, 0, 0); } curr_led++; curr_bitvec = curr_bitvec >> 1; } // Skip LEDs that loop around at the corners for (int i = 0; i < NUM_LEDS_SKIP; i++) { if (curr_led < 300) leds[curr_led] = CRGB(0, 0, 0); curr_led++; } }
By using a bit-vector instead of a naive integer matrix, we save (SIZE_INT – 1) * 256 = 992 bytes per 16×16 image.
An image from testing the matrix code:
Many possible mounts for the matrix onto the jacket, but the biggest concern is flexibility while maintaining integrity of the matrix to stay on the back. The most likely approach is to glue the matrix onto a clothe, which is then screwed or sewn onto the jacket. Heat shrink wrap and hot glue will serve as waterproofing for holes that have to be put into the jacket.
There is also a preliminary communication protocol that has been developed for the Arduino, which will be utilized when the Raspberry talks to the Arduino via Bluetooth.
Saturday (16th)
Worked on the LKM, but after working a while decided to switch to pigpio instead of using an LKM because measuring pulse width requires two interrupt handlers, one for rising and one for falling edge, or requires checking the pin level within the interrupt handler, which apparently takes a uncertain amount of time. Using pigpio instead polls the GPIOs at a set frequency, while this still isn’t the most accurate, at least the error will be predictable and there is no need to mess with the kernel.
Sunday/Monday (17th/18th)
Worked further on the proximity sensors (ultrasound). Managed to get two working at the same time using my program interfacing with pigpio. Wrote the library to support six, which is the number we need. Am mildly concerned about the performance of the rest of the software running on the pi given the pigpio’s need for polling, but so far it seems like it is okay. Would consider the proximity sensors essentially ready for testing.
Tuesday/Wednesday (19th/20th)
Worked on the bluetooth connectivity between the Pi and the Arduino. Figured out how to configure the HC05 bluetooth module for the Arduino to use. Tested out the C libraries for the Pi’s Bluetooth connectivity.
Updates
Sunday
Monday
Wednesday
Saturday
Accomplishments
Future
Sid Lathar, A1 | Progress Report #3
Accomplishment:
Following previous week’s report the method was implemented into the Hello world app. The app can now use Google Maps API to get current coordinates of the phone and get the nearest intersection to it.
Changes to schedule:
The progress is on schedule.
Upcoming work:
By next week I plan to implement the following features into the app:
– Basic UI to toggle intersection search (right now it’s ongoing as long as the app is running)
– Plan the layout for the app
– Research on communicating with the Pi
Accomplishments this week:
Above: brake light is the entire panel, but at low power
Below: Turn signals, we are not using all the lights.
Concerns:
We had presentations this week, and were able to see many aspects of how even projects that were well underway and seemingly on a good track still could use some design reflections and feedback.
For our team specifically, we mostly missed out on specifications for our battery life and weight. This is a very important aspect of our product, as the first two things a consumer are probably going to consider in our product are:
Our plan is to conduct some sort of competitive analysis on other similar situations, and the other is to conduct a small user test to see how people respond to weight and battery life. We met with Prof. Ken Mai as well to talk about other ways to find solutions for our problem.
We also received a concern about how we plan to measure the brightness of our LEDs, but for now, we are going to assume that we light all of the LEDs at 100%, and we are going to use the candela ratings that the datasheeet gives us. If we need to adjust the brightness to an in between, we can consider buying a sensor (around 6.99) to test it out.
Sunday:
Thursday