Vicky’s Status Report for April 19

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

This week I worked on:

  • Spray painting the 6 outer boards of the machine box and the “SweeTrivia” letters together with Min Ji. Laser cut the front, back, and left boards and the decoration letters.
  • Due to some code changes with Min Ji’s  rpi download implementation, the audio narration and dispense programs were taken out, so I added the backend narration control code and i2c communication code back in to fit the updated rest of the code base.
  • Implemented the sound effects for correct and incorrect answer selection for user engagement. Added 2 types of background music for the round over screen and the candy selection screen.
  • Worked on final presentation outline structure, hardware (page 5&6), testing (page 9&10), design tradeoff (page 11).

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?

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

My progress is on schedule! I will work next week on:

  • The new coil is crazy expensive and did not work. Will go back to hand-made coil and try shaping it to make it more stable.
  • Finalize final presentation slides.
  • Glue the motors and coils and attach all hardware in place on the machine.
  • Shoot final video.
  • Debug the QR code upload with team.
  • Add shopping mechanism code.
  • Work on final poster.

Vicky’s Status Report for April 12

  1. What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).
    Audio narration fix: (Min Ji was working on the audio narration prior to this week and because she became stuck on the task, I took over the audio narration.) Confirmed espeak-ng on Raspberry Pi is installed and configured. Created Backend API Endpoint in server.js, added route /narrate to receive narration text from the frontend. Also I created NarrationControl.tsx that calls speakWithEspeakNg() and controls narrate time and content. Inserted narration state variable inside TriviaCard.tsx to ensure the screen does not respond to user touch until the narration is complete. video
    Ordered new coil, paint, and more compatible-shaped candy.
    Rpi Download:
    work together with Min Ji on rpi-download testing.
  2. Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?
    My progress is on schedule, I plan to implement my tasks according to schedule posted in team report.
  3. What deliverables do you hope to complete in the next week?
    Sound effects: when correct answer, wrong answer, game over, candy selection page, and candy dispense complete.
    Shopping mechanism: implement reduction logic eg. player has 40 points in total, can have multiple opportunities to select affordable candies such as 10+30 or 10+10+20

In particular, how will you analyze the anticipated measured results to verify your contribution to the project meets the engineering design requirements or the use case requirements?

Dispense: meets accuracy and time requirement in use case.

Webpage ux design: meets intuitive ux flow for user to input questions.

Audio: meets design requirements and achieves desired features in timing, voice type, clearness.

Team Status Report for April 12

Team questions:

1. What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready? (by vicky)

  • Audio narration now works: the rpi was able to connect to an external bluetooth speaker and output audio, but the narration generated by the tts program was not outputting audio on the rpi). We have modified our use of espeak-ng, configured in on rpi, added backend API endpoint for narration, created NarrationControl.tsx component to call speakWithEspeakNg() and added narration state variable inside TriviaCard.tsx to control narration flow. 
  • Machine body finger joints: the finger joints are not precisely matched due to laser cutting error margins. We managed by gluing the edges so the panels are fixed in place.
  • Customized questions website upload & rpi download: We are currently working towards enabling players to input their own questions that can be added to the pool of trivias. 
    • Datapath
      • Website question input -> csv uploaded to cloud google drive (done)
      • Cloud google drive -> download csv to ‘SweeTrivia’ code base (done)
      • Read csv and add to .json file with all questions (done)
    • UI/UX
      • Homescreen: [Make my own question] -> [QR code of website] [download question set] [Back] -> home screen
      • Deploy website to make QR code. 

2. Were any changes made to the existing design of the system (requirements, block diagram, system spec, etc)? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward? (by Fei)

Yes, some minor changes were made to the existing design of the system. On the software side, we are introducing a UX improvement to the Raspberry Pi’s question download process to make it more intuitive and stable during gameplay. This adjustment is necessary to improve user experience and ensure consistent communication between the game logic and the RPi. The added development and testing time are the main costs of this change, but we plan to mitigate them by distributing tasks efficiently and prioritizing integration early next week.

On the hardware side, we are adding cosmetic upgrades such as painting the vending machine for a more polished final look. Additionally, we are planning to replace the current copper coil used for dispensing candy. The existing coil is too flexible and fails to push out the product effectively. Replacing it with a sturdier material will improve dispensing reliability. While these changes involve some additional material costs and build time, we will manage them by sourcing affordable materials and coordinating team work sessions to stay on schedule.

3. Provide an updated schedule if changes have occurred. This is also the place to put some photos of your progress or to brag about a component you got working. (by vicky)

  • Post MVP tasks:
  1. Sound effects and music
  2. Shopping mechanism in candy selection page
  3. Customized questions narration & narration in challenge mode
  • Updated schedule
Tasks Due
Shopping mechanism in candy selection page SUN, 4/14
Question randomization (300 basic questions + customized questions) SUN, 4/14
Get rid of emoji / download new font SUN, 4/14
Add sound effects & kahoot-style music TUE, 4/15
Final presentation slides WED, 4/16
LED strips for internal lighting Day before demo
Machine panel painting  SUN, 4/14
UX new game flow for customized category: 

  • Play: Categories [special questions] -> …  -> candy selection
  • Download: [Make my own question] -> [QR code of website] [download question set] [Back] -> home
MON, 4/14
QR code and deploy website MON, 4/14

 

Now that you have some portions of your project built, and entering into the verification and validation phase of your project, provide a comprehensive update on what tests you have run or are planning to run.  (by vicky)

  • Tests
Already Run Planning to Run
Rpi touchscreen standard mode game flow (homescreen -> … -> candy dispensed finished -> back to homescreen) touch input Audio output of sound effects and background music between narrations.
Rpi touchscreen challenge mode game flow Remote synchronization of question base after website deployment
Dispense from candy selection, serial communication from rpi to arduino. Activate correct motor & update correct dispense status. Randomized question
Audio narration with python tts (did not proceed)
Audio narration with espeak-ng, speed 100-150, female voice type 2. 
Webpage question upload to google drive
Code base csv download  and append to .json

Git Repo

Vicky’s Status Report for March 29

This week:

  1. Machine fabrication: discussed and decided with team on the specific sizing of each wood panel (12 in total, include external front,back,top,bottom,right,left panels, internal vertical divider board, 2 horizontal level boards, 2 small vertical interval boards, internal back panel). Laser cut and assembled box (seen in team status report). Made 4 wire spirals to hold items to dispense.
  2. Dispense works: Rpi to Arduino I2C communication: wrote arduino code and wrote modifications to the React App in frontend “CandyDispensingScreen.tsx” and added I2C backend “server.js” in standard mode code directory for serial communication of the candy 4-types selection signal (rpi -> arduino) and dispense status signal (arduino -> rpi). Setup I2C dependencies on rpi.
  3. Screen attachment: 2 revisions of 3D print file for the screen holder. Modified holder’s middle gap(10mm->6.4mm) and print infill density (60%->80%) to allow secure attachment to machine. Reduced holder’s middle thickness (10mm -> 5mm) to fit screen into the cut-out opening on front panel.
  4. External speaker: Tested 3.5mm audio jacks on both rpi board and touchscreen, audio jack works on rpi but does not work on touchscreen, might be a touchscreen audio configuration issue (to be examined after interim demo).  Achieved successful and stable sound output by using bluetooth speaker paired with rpi. The gameplay’s audio output is not outputing like other general sound test examples and will be debugged further by Min Ji.
  5. Kiosk display: Used chromium zoom for successful full display of game screen.

Next week:

  1. Interim demo: prepare demo talk and record backup demo video before Monday.
  2. Webpage: fix database upload and rpi local download, (supabase -> google sheet upload) figure out how user can delete/clear chosen local rpi storage.
  3. Box upgrade: add lighting
  4. User engagement upgrade: add sound output and dynamic graphics (“congratulations! …”) at the end of game. Add dispense status message screen.

Vicky’s Status Report for March 22

This week:

  1. Gameplay: I fixed the local npm run issue on my end by modifying the vite.config file and my local npm vite setting. I continued working together with Min Ji on the standard mode testing on touch screen. I also updated the code base on rpi, and tested the challenged mode gameplay together with Fei.
  2. Web page: I updated the homescreen of the question custimization website, modified the input question and answer format, make sure it can be real-time transformed into a csv file ready for cloud upload / local download. I created a supabase project and linked the url and passkey it to the webpage react code. There is an row-level security issue that is blocking the page from writing to the database. I plan to resolve this by making an .env file with passkey authentication, connect the react app to a google sheet for read, and make authenticated user writes to it.
      
  3. Kiosk display: I set up the rpi system kiosk mode for general chromium websites view by making a runkiosk.sh script that makes rpi open chromium and go to a specific website, and editing rpi’s Wayfire initialisation file to make sure the script is opened once the rpi boots up. However this is not ideal to our current project position due to the website not deployed yet. I will swtich to single command-line browser kiosk mode for future gameplay views till we have a deployed site.
  4. Servo control: I finished writing the arduino program for the control of 4 motors and a test program where the motor to be turned (1-4) is entered in command line and the motor turns 360 degrees for a single dispense cycle. The servo motors’ setting was 0-180 degrees on both sides so making a 360-degree turn need to be done sequentially twice. Video
  5. Mechanical box design: I have discussed with Min Ji on the CAD design of the physical machine body. We have decided to not use screws but to use box joints to interlock the MDF boards since we now are using a thicker wood. We also clarified the inside compartment arrangement and how they will be connected to the outer panels.

Our progress is still behind in terms of integration. We plan to work on assembling the machine next week along with software further cleanup and debugging. For next week I am going to:

  1. Make the laser cut CAD files for the six outside panels and two compartment panels inside.
  2. Make the arduino work together with the rpi item selection signal and dispense.
  3. Glue the servo motors to wire spirals, make secure wire connection long enought to allow item refills.
  4. Work together with team on machine assembly.

Vicky’s Status Report for March 15

This week:

  • I finished the arduino control code for the arduino mega,  it takes input signals from 4 GPIO pins from the rpi4 that each carries information on which candy to dispense, type 1,2,3, or 4, and the aduino controls 4 rotational servo motors, if the input signal says type 1, then that corresponding servo motor rotates for 360 degrees and stops. the arduino sends a one bit output from another GPIO pin that indicates the rotation is complete.

  • ssh’d into the rpi4, pulled from git and tested the standard mode program on the rpi touchscreen with Min Ji. Test video availble in team report.
  • Created the starter react code for the web page under the “webpage_code” directory in our git repo and modified the interface for the game’s visual theme, modified vite.config.ts for it to automatically pop up on touchscreen,  modified TransitionLayout.tsx for our ux flow.
  • Merged the wepage repo and the standard mode code repo and fixed the local npm run issue for both gameplay and webpage.

Our progress is behind in terms of integration. We plan to work on software integration next week together with the physical build. For next week I am going to

  • Fix the audio narration web-run stuck issue on rpi screen together with Min Ji, and go through testing for the addition of candy selection and other screens.
  • Work on laser cutting and connecting the wood boards for the machine body together with team.
  • Assemble hardware connection of voltage down converter, motors, arduino, rpi, and screen.
  • Integrate cloud database user csv upload with supabase on webpage.