🐈As a new cat owner, I know I need to pay extra attention to his well-being and prevent him from getting sick due to my negligence. So I want to know if there is any problem with the diet and feeding method I have prepared for my cat by observing his littering behavior.
But due to work, I can't be with him for the whole day, so I want to make a project that monitor his littering behavior and record the data for me to check when I get back home after work.
So, in this project, I placed a Grove-ultrasonic distance sensor in the litter box, it will detect my cat every time when he comes into the box, and the detection can be counted and recorded on a Grove-4-digit display.
A normal 3-month-old cat will have 2-6 times of excretion a day. Otherwise, it may have diarrhea or constipation. If so, I need to change his diet or supplement with some probiotics.
💛Pets always bring us endless happiness, so it is very important to pay attention to their physical and mental health, allowing them to stay with us longer.
Software setup ¶- Step 1. Download and Install the latest version of Arduino IDE according to your operating system
Step 2. Launch the Arduino application
- Step 2. Launch the Arduino application
Step 3. Add Seeed Studio XIAO nRF52840 (Sense) board package to your Arduino IDE
- Step 3. Add Seeed Studio XIAO nRF52840 (Sense) board package to your Arduino IDE
Navigate to File > Preferences, and fill "Additional Boards Manager URLs" with the url below: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
Navigate to Tools > Board > Boards Manager..., type the keyword "seeed nrf52" in the search box, select the latest version of the board you want, and install it. You can install both.
- Step 4. Select your board and port
Board
After installing the board package, navigate to Tools > Board and choose the board you want, continue to select "Seeed XIAO nRF52840 Sense". Now we have finished setting up the Seeed Studio XIAO nRF52840 (Sense) for Arduino IDE.
Port
Navigate to Tools > Port and select the serial port name of the connected Seeed Studio XIAO nRF52840 (Sense). This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports). The serial port of the connected Seeed Studio XIAO nRF52840 (Sense) usually contains parentheses that are written Seeed Studio XIAO nRF52840 for Seeed Studio XIAO nRF52840 or Seeed Studio XIAO nRF52840 Sense for Seeed Studio XIAO nRF52840 Sense.
- Step 5. Navigate to File > Examples > 01.Basics > Blink to open Blink example
- Step 6. Click the Upload button to upload the Blink example code to the board
Once uploaded, you will see the built-in red LED blinking with a 1-second delay between each blink. This means the connection is successful and now you can explore more projects with the Seeed Studio XIAO nRF52840 (Sense)!
- Step 7. Download the UltrasonicRanger Library from Github.
- Step 8. Download the Grove-4-Digit Display Library and TimerOne Library.
Connect XIAO on the expansion board and the rest groves with the following pinout schematic.
Comments