Can I use a React to create the UI for my IOT project and how can I connect the two together?

Here's a brief overview of the project. I'm creating a poultry care and monitoring system. It'll have automated feeding, automated water container filling, automated medicine dispensing, live streaming of the chicken coop, environment monitoring and environment control. I'm using Arduino Uno to control the entire thing. My vision is for the setup of the device the user will press a button on the Arduino's which will generate a code which will be entered in the mobile app in order to link the device, this is done so that a user can have multiple a devices linked to the app. After that the user will set the feeding schedule, feed amount, temperature and humidity requirements of the chicken, chicken coop details, etc. The Arduino will be connected to the WiFi and then fetch the feeding schedule, feed requirements, temperature and humidity requirements, etc and load those instructions.

My questions are:

  1. Can I use React Native with the Arduino? If yes how? I've tried using Blynk but its functionality is limited it doesn't support live streaming.
  2. Every time the user makes changes to the settings of the IoT-device via the mobile app how can I get the Arduino to listen to these changes? For example the user changes the feed amount in the app, change then gets sent to Firebase, and Firebase sends this to the Arduino.
  3. How can I send the data received by the Arduino Uno from a DHT22 sensor to Firebase?

Your other topic on the same subject deleted.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

any particular reason to use a UNO?
I would recommend using a microcontroller with onboard WiFi, e.g. ESP32 which has onboard WiFi, Bluetooth Classic and BLE

I actually realized too late into the project that an Uno isn't the best choice but if I change the Microcontroller I have to change the documentation and presentation that I've already done. Schematics have been drawn up and the components have been wired up with the Uno. Can I use React Native and Firebase with the Arduino? if yes how?

Do you have an Uno R3?
An R3 Uno with an ethernet shield would allow socket communication.
The R3 is very memory limited so all the complicated stuff will need to de done on the phone.

How familiar are you with React? All these UI frameworks are massive and complicated. If starting from scratch then expect to spend multiple days or possibly weeks learning the basics.

Yes, I have an Uno R3 and I'm very familiar with React over 5 years of experience with.

if you have used React with a UNO R3 in the past what is your problem?

I haven't used the Uno R3 for an IoT project this is the first time. The 5 years of experience is with React and not Arduino I've only started learning Arduino for the past two months for Uni. Can I use React Native with Arduino Uno R3? If yes how and what do I need? and how can I send data from the Arduino Uno R3 to Firebase?

If you want a working demo, forget about attempting direct Auduino -> Firebase comms.
Use an Ethernet shield with MQTT to send/receive messages from React.
Get that working then add the code for the DHT22 sensor.
At that point the Uno will probably be close to running out of memory.

As I said previously, all the smarts are going to be in your React code including the Firebase code. The Arduino is going to be a dumb box sending data on request to React and doing whatever the React app tells it to do.

....and don't use JSON for messaging. The Arduino will literally only have a few bytes in which to do everything.

My plan is to have the instructions (feeding schedule, feed amount, medicine dosage) all stored in Firebase so that when the user changes any of these parameters the Arduino can easily fetch the instructions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.