Overview
Shroombiosis is a mushroom-shaped sculpture that acts as a companion to a living plant. Placed in the soil beside it, the mushroom watches over the plant. Each time sunlight reaches the UV sensor on its cap, a camera hidden underneath photographs the plant, and the mushroom records the temperature and humidity at that moment. The idea is that, over days and weeks, the photos build into a time-lapse of the plant growing, with the conditions it grew in logged alongside.
It also runs its own small web page. From any phone or computer on the same Wi-Fi, you can see the latest photo and readings, or take a photo on demand. That lets you check on the plant, or on the sculpture itself during a storm, from inside the house.
I made it for my Applied Programming module, building the electronics, writing the code and making the sculpture myself.
The idea
Fungi are often thought of as parasites, but most of the time they work with plants. Their mycelium joins onto plant roots and links neighbouring plants together, sharing nutrients and information in both directions, and fungi turn decay back into food for the whole ecosystem.
The project draws a parallel with how dependent people have become on technology. Phone numbers, online accounts and digital applications are now part of everyday life, and technology has gone from optional to essential. At the same time, especially with longer hours and the cost-of-living crisis, it’s easy to spend free time on a phone instead of outside, and to lose touch with the natural world.
Shroombiosis tries to bring the two back into the same space. A mushroom felt like the right symbol: it’s neither plant nor animal, and in nature it’s a sign of balance and connection. The sculpture fits plant care into the digital routines people already have, giving them a reason to watch the plant grow.
References
- Gorzelak, M.A., Asay, A.K., Pickles, B.J. and Simard, S.W. (2015). Inter-plant communication through mycorrhizal networks mediates complex adaptive behaviour in plant communities. AoB Plants, 7, plv050.
- Montesinos-Navarro, A., Valiente-Banuet, A. and Verdú, M. (2019). Plant facilitation through mycorrhizal symbiosis is stronger between distantly related plant species. New Phytologist, 224(2), 928–935.
- Robles-Carrillo, M. (2024). Digital identity: an approach to its nature, concept, and functionalities. International Journal of Law and Information Technology, 32(1).
- Bradley, A.H.M. and Howard, A.L. (2023). Stress and mood associations with smartphone use in university students: a 12-week longitudinal study. Clinical Psychological Science, 11(5).
The electronics
Everything runs on a Seeed Studio XIAO ESP32-S3 Sense, a tiny board with a camera attachment, a microSD card slot and a Wi-Fi antenna. Two sensors connect to it, both powered from its 3.3V pin through a breadboard:
- A UV sensor on pin A0 outputs a voltage that rises with UV strength. I originally planned an ordinary light sensor, but car headlights at night could have set it off. UV mostly comes from the sun, so a UV sensor keeps the photos to daylight and makes them more consistent.
- A DHT11 temperature and humidity sensor on pin D1. I considered soil moisture too, but temperature says more about whether a plant is at risk. Soil can be perfectly moist in winter while the frost kills the plant.
The wiring software I used didn’t have my exact parts, so the diagram stands in an infrared detector for the UV sensor and a similar temperature sensor for the DHT11. The connections are the same.



I tested each part on its own before combining them, building up through five test sketches:
- Reading a sensor on its own.
- Getting the camera to take and serve photos over Wi-Fi, adapted from the ESP32-S3 Camera Web Server tutorial to fit the XIAO’s pins.
- Reading temperature and humidity.
- Reading the UV sensor and the DHT11 together.
- Checking the microSD card.
A UV torch let me test indoors when the weather was too bad to go outside. With the torch on, the sensor read around 600 mV, and close to nothing with it off.
How it works
The finished sketch brings all of that together:
- The UV trigger. The mushroom reads its UV sensor constantly, averaging 25 samples each time to smooth out noise. When the level stays above the trigger point for half a second, it takes a photo, then waits 15 seconds before it can take another, so one bright spell doesn’t fill the card.
- Photos and a log. Each photo is saved to the microSD card as
Shroombiosis1.jpg,Shroombiosis2.jpgand so on. A line is added tolog.csvwith the date and time (from an internet time server), the photo’s name, the UV level, the temperature and the humidity. That spreadsheet-friendly log is the timeline of the plant’s growth. After a restart, numbering carries on from the last photo on the card. - A web page on the mushroom. It shows the latest photo, the latest readings and the latest log line, with buttons to take a manual snapshot and refresh. Manual photos are saved and logged the same way as sunlight-triggered ones.
- Coping with flaky parts. The DHT11 sometimes fails to read, so the code retries up to three times. If the SD card is missing, everything else keeps working without saving.
The two snippets below show the heart of it. Averaging the UV sensor:
// Read UV sensor with averaging to reduce noise
int readUvMilliVoltsAveraged() {
#ifdef ESP32
analogReadResolution(12); // 12-bit ADC resolution
analogSetPinAttenuation(uvPin, ADC_11db);
#endif
long sum = 0;
int i;
for (i = 0; i < UV_SAMPLES; i++) {
int reading = analogReadMilliVolts(uvPin);
sum += reading;
delay(UV_SAMPLE_DELAY_MS);
}
int average = (int)(sum / UV_SAMPLES);
return average;
}
And the main loop, which only takes a photo once the UV level has stayed high for long enough:
void loop() {
server.handleClient();
// UV trigger state tracking
static unsigned long aboveSince = 0;
static unsigned long cooldownUntil = 0;
unsigned long currentTime = millis();
// Skip if we're in cooldown period
if (currentTime < cooldownUntil) {
return;
}
// Read current UV level
int currentUvMv = readUvMilliVoltsAveraged();
if (currentUvMv >= UV_THRESHOLD_MV) {
// UV is above threshold
if (aboveSince == 0) {
aboveSince = currentTime; // Start tracking
}
// Check if it's been above threshold long enough
if (currentTime - aboveSince >= TRIGGER_HOLD_MS) {
Serial.printf("[UV_TRIGGER] THRESHOLD -> UV %dmV >= %dmV\n", currentUvMv, UV_THRESHOLD_MV);
bool sdAvailable = SD_MMC.cardType() != CARD_NONE;
captureAndRead("UV_TRIGGER", sdAvailable);
cooldownUntil = currentTime + COOLDOWN_MS;
aboveSince = 0; // Reset tracking
}
} else {
// UV dropped below threshold, reset
aboveSince = 0;
}
}
Building the mushroom
I’d have liked to carve it from wood, but I didn’t have the tools or the woodworking skills, so I built it from cardboard. It’s cheap and easy to reshape while prototyping, and it’s a material that usually goes to waste, which suits the project.
- The cap is a large cardboard circle with a cut from the edge to the centre, folded into a cone. White spots finish the look. A smaller circle underneath holds the electronics.
- The stem is a long sheet of cardboard rolled into a tube, standing on a weighted base so it doesn’t tip over.
- The electronics sit under the cap. The breadboard is mounted upside down with the ESP32 on it, because the camera’s cable is short and the camera needs to point down at the plant. The UV sensor goes on top of the cap, where the sun can reach it, held on with white electrical tape.
- Access. Feeding the wires through the cardboard was fiddly, but the cap lifts off, so it was easy to reach everything and make changes.



Problems along the way
- Delay on photos. A manual photo can take up to five seconds to appear. That’s fine for still photos, so I added a Refresh button rather than chasing it, but it would need solving for video.
- A damaged SD card. Saving kept failing until I worked out the card itself was faulty. A new one fixed it.
- The breadboard’s weight. I used a breadboard because I didn’t have splitters for the shared power and ground, but it’s heavy and made the mushroom top-heavy.
- Not yet outdoors. The cardboard isn’t waterproof, and it still runs from my computer’s power, so all testing so far has been indoors with the UV torch.
Looking back
I’m genuinely proud of this. It’s a simple prototype, but it works: a sculpture that runs its own network page, which anyone in the house can use from their own device to check on the plant and take photos.
Next time, I’d:
- make it from wood, with latches to keep the cap closed and the electronics secure
- use splitters instead of a breadboard, so it’s lighter and the board can sit upright, with a camera extension cable keeping the camera facing down
- give it its own power and weatherproofing so it can live outside, staked into the soil next to its plant
- leave it running long enough to make a real time-lapse
Download
Download the Shroombiosis project files
This is the complete project: the final Arduino sketch, the five test sketches, the wiring diagram, the components list, the build photos and my write-up. It’s here mainly for reading, because the code only runs on the same hardware: a XIAO ESP32-S3 Sense with its camera and a microSD card, a UV sensor on A0, a DHT11 on D1, and a Wi-Fi network. It won’t run on a computer or on other boards without changes.
If you do have the parts, RUNNING THE CODE.txt in the zip walks through setting up the Arduino IDE. The Wi-Fi name and password in the code are placeholders that you replace with your own network’s details.

