This week was mainly focused on finishing touches and preparing the app so that it felt more complete. Diana helped me set up placeholder React states in case we were able to connect the Arduino to the app later. This was useful because it showed me how the app could be prepared for future hardware integration, even if the full connection was not completed during this stage of the project.
const [batteryCharge, _setBatteryCharge] = useState<number>(65);
const [powerRecieved, _setPowerRecieved] = useState<number>(4.5);
const [cranksRemaining, _setCranksRemaining] = useState<number>(125);
const [timeLeft, _setTimeLeft] = useState<number>(2.5);
<BatteryCard
title="Hand Crank is Turning!"
subtitle="Charging Battery..."
chargeText={`${batteryCharge}% Charged!`}
remainingText={`${cranksRemaining} Cranks Left`}
fillPercent={batteryCharge}
/>
I found this simpler than I expected, which made me realise that some coding concepts are not as complicated as I first imagine. I think I sometimes stress myself out before fully understanding what the task involves. Once the code is broken down and explained, it often becomes much easier to follow. This has helped me feel more confident in my own ability and has shown me that I know more than I originally thought.
One thing I still struggle with is remembering the exact way things are written between different coding languages. A lot of languages have similar logic, but the syntax can be different, which sometimes makes me second-guess myself. I also find it challenging when adding something new into an existing codebase, because I need to work out where it fits without disrupting the rest of the app.
Overall, this collaborative project has been very insightful. It has helped me understand how important it is to keep code tidy, readable and organised across different files. I have also learnt more about linking components, states and pages together in a way that makes the app easier to update in the future. Going forward, I want to keep improving my confidence with React Native and become better at understanding where new features should fit within a larger project structure.
