Nathan’s Status Report for Dec 4 2021

What did you personally accomplish this week on the project?

This week I finished up all the functionality of the backend, ironing out any bugs that came up during further testing. This included fixing the response codes from 201 to 200 which is more general. The backend is now very robust and extendable.

For the frontend, I finished all the requirements, such as compartmentalized region viewing. Now, viewers can see which seats are open in a subsection of the space:

I conducted a study on latency on the API calls as well as rendering for the final presentation.  I ran scripts to call the functions

create_hub: 150.2 ms
create_seats: 72.3 ms
delete_hub: 57.0 ms
delete_seats: 82.0 ms
update_seats: 68.2 ms
get_all_free_seats: 123.8 ms
Generalized worst case: 400 ms

Rendering average case: 100 ms, worst case: 200 ms

All these times meet our requirements which is great!

I then spent the rest of the time preparing for the final presentation which went really well.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward. All parts are  is working well, so now I just have to do final extra touch ups on the frontend, such as making it look prettier.

What deliverables do you hope to complete in the next week?

This week, my task it to add final extra touch ups on the frontend,. Specifically, I will add the particles library to the background of the page to give it a more lively, tech feel. I will also be working on the video we must do. I can’t wait! 🙂

 

Jonathan Cheng’s Status Report for Dec 4 2021

This week was the week of Final Presentations, and as such I have not made any progress in class time. In addition, since the data hub is largely complete, I have not spent any time outside of class to work on it. Right now, the only part we are waiting to complete is the extra chair sensor. In addition, I am waiting for my ordered SD Card to arrive. Once it does, then I can flash it with the raspberry pi OS, plug it into the second raspberry pi, and it should be active.

Due to other classes’ commitments, I will not be working on Freeseats this weekend. However, after Tuesday, I plan to retrieve my SD card, activate the second data hub, download the code onto it and wire up the second XBee. Once those steps are complete, both data hubs should be ready for the demo.

Nathan’s Status Report for Nov 20 2021

What did you personally accomplish this week on the project?

This week, I worked with JJ to fully integrate the data hub and the public API endpoint of our backend. now, it is working!

Then, I made 15% more progress on the frontend of the project. My idea is to make it very simplistic and easy on the eyes for clients. I restructured the React code to convert from class-based to functional-based code. This is more of an updated coding style with modern react, and it will be extremely helpful due to some of the new frontend requirements (map interface).

Specifically, I now structure components asfunction myComponent() { ... } rather than class myComponent extends React.Component { ... }

This style of coding React has reported to have massive performance improvement and allows for clean, stateless components.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward. Integration is working well, so I just have to finish the frontend component by the final presentation. I will be working hard in the weeks to come.

What deliverables do you hope to complete in the next week?

This week, my task it to complete on the web application frontend. Specifically, I need to implement a map feature that shows clients areas of free seats and quantity of free seats. I can’t wait! 😁

 

Jonathan Cheng’s Status Report for Nov 20 2021

This week was a productive week for Freeseats. My project component, the datahub, has been largely complete for about a week or two. Thus, I have been working with Will to get the chair modules connected to the datahub. This week, we spent many hours in the lab soldering and configuring the XBee modules to network, and have found great success. After that, we converted the chair modules to run on battery power. The end result is now that two battery-powered chair modules, attached to real chairs, can communicate with a central datahub.

In addition, I tested the datahub’s connection with the backend API earlier in the week. There were some schema inconsistencies that we had to debug by hand, but now it is all cleaned up. The datahub can convert and format received chair data and send the correct state updates to the backend. A full integration test was ran successfully on Wednesday.

This weekend and early next week, Will and I plan to go into the lab to collect some testing metrics for the hardware components, including network latency, sensor accuracy, and power consumption. After this, I will look towards setting up a second datahub to represent another workspace for the final demo. This will bring us to the final presentation, which we will be putting together over thanksgiving break.

Nathan’s Status Report for Nov 13 2021

What did you personally accomplish this week on the project?

This week, I worked with JJ to connect the data hub and the public API endpoint of our backend. I also made the post requests of create_hub, create_seats, update_seats, delete_hub, delete_seats, get_free_seats more robust.

Specifically, I fixed a bug when a hub is instantiated without seats. This would make the filtering of seats have an index out of bounds error.  Thus, I fixed this by adding a check for the edge case of empty hubs.

Then, I made 15% more progress on the frontend of the project. My idea is to make it very simplistic and easy on the eyes for clients. The demo showcasing all of this went very well.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward, after our demo. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come.

What deliverables do you hope to complete in the next week?

This week, my task it to work on the web application frontend. Specifically, 15% this week would keep me on track with respect to the schedule. I can also help JJ and Will on their parts, which currently pose more of a risk, as the software stack basic functionality is stable. I can’t wait! 😁

 

Jonathan Cheng Status Report for Nov 13 2021

This week there was a slight lull in progress, due to two main factors (shipping delays, and external coursework). Despite this, I still made some meaningful steps towards completing the Data Hub. One crucial component, the XBee breakout board, did not arrive until Wednesday, meaning we couldn’t work on configuring the XBees until then. So, at the beginning of the week, I worked on testing the Data Hub’s connection to the backend, making sure all the schemas were aligned and verified for seamless communication. This was successful, and the Data Hub can now communicate with the deployed backend API.

Once the breakout boards arrived on Wednesday, Will and I got to soldering the XBee’s to the breakout boards, so that they can be plugged into regular-sized breadboard inputs. After that, we configured both XBees by using the Arduino as a serial converter.

At the start of next week, we expect that we will be able to begin testing of XBee communication, which is the final big step in our development. Once this is complete, finishing the capstone project will just be a matter of recreating another Data Hub for multiple-workspace use cases. Exciting!

Nathan’s Status Report for Nov 6 2021

What did you personally accomplish this week on the project?

This week, I finished the deployment of the backend server. Now, the backend server is able to handle post requests of create_hub, create_seats, update_seats, delete_hub, delete_seats and the important get request of get_free_seats from the public endpoint of:

https://freeseats-a3.herokuapp.com/

I used Heroku, due to low-costs (free), and focus on deployment of an MVP. However, Heroku has capabilities to handle large load, which will be important if we wanted to scale our project.

This is for use of the data hub component. For integration, I wrote a quick API docs for use of the backend API: https://github.com/FreeSeats-Team/freeseats/blob/web-deploy/web_app/README.md

I made a frontend that is a basic skeleton to simply display data in a list form with elements:

Data_Hub_ID: #_of_free_seats

This will be extended upon to include location and aesthetics.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward, for our demo. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come.

What deliverables do you hope to complete in the next week?

This week, my task it to work on the web application frontend and polish out the backend if issues arise. For the demo, I hope to have MVP functionality of the frontend with backend integration with the hardware components. After the demo, I will polish out the frontend’s aesthetics and add more robust database entries (with locations, etc.). I can’t wait! 😁

 

Jonathan Cheng’s Status Report for Nov 6 2021

This week, my time was half spent on flashing the RPi with the proper OS and configuring hardware settings to accept GPIO data. Overall, this was a successful endeavor, and I got my data hub code installed on the machine, with all dependencies as well. The second half was spent with Will, helping him with whatever he needed to do to get the sensor connected to the XBee. Fabrication generally takes more time than writing code, so any help I could give, I did.

The work we did this week sets us up well for next week’s interim demos. All three of our components have developed decently, and though we are far from done, we are well on our way. Upon looking at the initial setup for the XBee, it seems like the configuration is going to be fairly straightforward. If everything goes according to plan next week, we should be able to get a full integration test by the middle of the week.

After running an integration test, the next thing to do is fabricate more chairs and one more data hub, to move towards more real-world situational tests. This will put us towards the end of the development cycle for our capstone project.

Nathan’s Status Report for Oct 23 2021

What did you personally accomplish this week on the project?

This week, I worked on the ethics portion of Capstone, and reflected a lot on some of the ethical problems that came with our project with the group. These include:

-Someone viewing FreeSeats to steal things when people aren’t there

-Finding a single person in the library alone as a target for theft or violence.

-Exclusionary to people in wheelchairs

I will continue to keep these ethical problems in mind throughout the implementation and create guards in software to remedy them (ie. range of available chairs instead of specific values).

This week, I continued to work on the web application. I continued to bootstrap the cloud storage, MongoDB, which I chose due to accessibility and ease of use within a JavaScript stack. I setup MongoDB Atlas, to store all of our data in the cloud. This was chosen based on my research of cloud storages with the idea of a scalable MVP as a priority.

My basic database schema is as follows:

const Seat = new Schema({
id:String,
occupied:Boolean,
}
)
const Hub = new Schema({
id:String,
seats: [Seat],
}
)

 

I decided to follow a one-to-many hierarchy to match the nature of a study space having multiple chairs. Each seat has a boolean of occupied or not. I implemented this schema to contain the minimal amount of information needed for functionality, as that makes it simpler for our MVP stage.

I also implemented the server skeleton and client skeleton that are able to interface with each other. This is using Express.js, Node.js, and React,js, which is part of the MERN stack. For the server, it supports CRUD operations, as this is the functional minimum of a database server. The client can then interface freely with the MongoDB Atlas cloud database during the development phase.

Is your progress on schedule or behind?

I am on schedule with my parts and feel confident moving forward. I expect that as we move further into the implementation part, we will have a lot more roadblocks, so I will be working hard in the weeks to come. We are gradually receiving our ordered products, and so far they all seem to be on schedule!

What deliverables do you hope to complete in the next week?

This week, my task it to continue working on the web application. I have to make 25% more progress on the server-side, and get a public endpoint up and running so that the data hubs can act as the clients interfacing with the server. I can’t wait!

 

Jonathan Cheng’s Status Report for Oct 23 2021

This week, I spent the first couple of days focusing on the Ethics assignment, in preparation for Wednesday’s guest lecture, which was enlightening and provided me with some valuable insights about our project’s ethics.

After the Ethics assignment, I started drafting up the Python code that would run on the Raspberry Pi. Specifically, I set up the team’s github repository, as well as the project structure. Then, I used jsonschema (a standard for defining json data models) to flush out the exact data structures being transmitted to and from each of our project components. Each component should use these schemas to validate all data sent and received, as the jsonschema standard has implementations in many languages. I then wrote my own validators for the schemas in Python, and tested them with my own PyTest tests, marking the beginning of the Raspberry Pi test suite.

After this, I begun writing the main script that will operate on the Raspberry Pi. The main logic involves reading the GPIO pin data for XBee-received information, processing that data into JSON, validating it, and modifying internal program state to reflect the received updates. In addition, I’m using the Python Time library to embed a countdown timer to program the 15-second timed backend API updates.

Next week, I hope to finish this program, test it on my local machine, and then load it onto an actual RPi, and see how it performs on the target machine.