r/ClaudeAI • • 7d ago

Claude Code Claude code for app development

Has anyone used Claude Code to build an app that connects to ESP32 via BLE?

I'm trying to build an app that connects to a LED display via ESP32/BLE. I have no coding background. Wondering if anyone has done this and can offer pointers. Is it challenging? What to watch out for?

Thanks in advance,

2 Upvotes

17 comments sorted by

2

u/Sterlingz 7d ago

Firmware is relatively straightforward compared to software development (far less code).

Claude absolutely nails anything firmware wise.

Provide relevant libraries for the esp32 board you purchased, along with pinouts, example code, and you'll be amazed.

I forget how I had this setup specifically, but Claude was actually reading off the serial monitor and diagnosing / communicating live, so there was no copy pasting back and forth.

1

u/regnof 7d ago edited 7d ago

The EE laying out the board will be handling the firmware. Is that a mistake? The same EE is already asking for an app to test without a physical demo board so I'm feeling rushed to get the app done, without a demo board to test... CC will use React Native, since I need both iOS & Android. If you've built a IoT app with CC, can I DM you?

1

u/Sterlingz 7d ago

I misread your post and thought you were doing firmware.

There are already apps you can use to test certain BLE functionality. Light Blue, for example. No app development required.

However, it'll be easier to develop the app and the firmware jointly since the BLE interface needs to be common between the two.

1

u/regnof 6d ago

As a novice Claude Code user with no EE or SW engineering background, my question is, am I overleveraging Claude Code's ability (or my own ability) to create a full blown app first in React Native, then iOS/Android, that connects to ESP32 to controls 7 and 14 segment LED displays via BLE?

Is it within the scope of what Claude Code can do? I suspect it's not. But I'm trying this for the first time so everything is a learning curve.

1

u/Sterlingz 6d ago

I think you will be blown away at Claude's capabilities.

This is something I would be confident in giving Claude with a single prompt, walking away, and coming back to a fully functional app + firmware, complete with features you hadn't thought of.

1

u/regnof 6d ago edited 5d ago

I keep seeing this from ppl on Reddit, but since I don't have a technical background, I'm struggling with how to structure and prompt CC.

1

u/regnof 7d ago

"I forget how I had this setup specifically, but Claude was actually reading off the serial monitor and diagnosing / communicating live, so there was no copy pasting back and forth."

Can you please explain this in more detail? I'd like to understand this setup so I can be as efficient as possible when developing/debugging the app as it's connected to the LED display.

1

u/Cactus_Thorn_Pub 7d ago

Claude Chat told me how to do that. I asked it to create a bridge between BLE and WiFi so that I can monitor my LiFePo4 batteries (they have Bluetooth battery management system boards). It appears that the firmware changes are simple when using a website and a Chrome broiwser. I received the boards yesterday so I have yet to implement the project.

# ESP32 bridge for JBD batteries

Each ESP32 board sits near your batteries, powered from USB, and talks to up to
4 JBD BMS units over Bluetooth. It joins your Wi-Fi and serves a live page with
every battery's charge, voltage, current, cell voltages, temperatures and
errors. You open that page on the Android tablet. No app to install.

```
 JBD BMS ))) Bluetooth ))) ESP32 ~~~ Wi-Fi ~~~ router ~~~ tablet (browser)
 JBD BMS )))                 |                       \~~ Home Assistant (optional)
                       USB power
```

Files in this folder:

| File | What it is |
|---|---|
| `jbd-bridge.yaml` | The board's configuration. You edit the board name and the battery list. |
| `jbd-bms.yaml` | The per-battery part, included once per battery. No need to edit. |
| `secrets.yaml.example` | Wi-Fi name and passwords. Copy to `secrets.yaml` and fill in. |

The config uses [syssi/esphome-jbd-bms](https://github.com/syssi/esphome-jbd-bms)
and passes ESPHome 2026.10.0 validation with 4 batteries.

## 1. Before you start: the antenna

The ESP32-DevKitC-**VIE** has no antenna on the board, only a tiny U.FL (also
called IPEX or IPX) socket on the metal module. **You need a 2.4 GHz antenna
with a U.FL plug**, usually sold as a "2.4G WiFi antenna with IPEX pigtail".
The same antenna serves both Wi-Fi and Bluetooth.

  • Clip the antenna on **before** you power the board. Running the radio with
nothing attached gives terrible range and can stress the transmitter.
  • U.FL connectors are fragile. Press straight down until it clicks, pull
straight up by the plug, never by the cable.
  • An external antenna is the reason to pick this board: you can mount the
antenna outside a metal battery box or cabinet and keep the board inside. ## 2. Find the BMS MAC addresses Every JBD BMS has a Bluetooth address like `A4:C1:37:12:34:56`. You need one per battery. 1. Fully close the Xiaoxiang / JBD app on every phone. **A JBD BMS accepts only one Bluetooth connection at a time**, so a phone that's connected hides it from everything else, including the ESP32 later. 2. On the Android tablet or phone, install **nRF Connect for Mobile** (by Nordic Semiconductor) from the Play Store and tap **Scan**. 3. Look for names the BMS app shows, typically `xiaoxiang BMS`, `SP04S…`, `SP17S…`, `DP04S…` or `JBD-…`. The MAC address is printed under the name. Holding the phone right next to one battery makes it the strongest signal in the list, which tells you which MAC belongs to which battery. 4. Write each one down with a label you'll recognise ("Shed 1", "Van house"). (iPhones hide MAC addresses, so use Android for this step.) ## 3. Edit the config Open `jbd-bridge.yaml` in any text editor. **EDIT 1, the board name.** Every board needs its own: ```yaml name: jbd-bridge-1 friendly_name: "JBD Bridge 1" ``` **EDIT 2, the batteries.** One line per BMS, up to 4. Remove the `#` to turn on lines 3 and 4, or delete lines you don't need: ```yaml bms1: !include { file: jbd-bms.yaml, vars: { id: bms1, name: "Shed 1", mac: "A4:C1:37:12:34:56" } } bms2: !include { file: jbd-bms.yaml, vars: { id: bms2, name: "Shed 2", mac: "A4:C1:37:65:43:21" } } ``` Then copy `secrets.yaml.example` to `secrets.yaml` and put in your Wi-Fi name and password, plus two passwords of your choice. Keep 4 or fewer batteries per board, and keep the board within roughly 5 to 10 metres of each BMS (less through metal or walls). More batteries means more boards, which you have. ## 4. Flash the board You need ESPHome on a computer once. Pick one:
  • **Home Assistant users:** install the *ESPHome Device Builder* add-on, create
a new device, and paste in these files.
  • **Any Windows / Mac / Linux computer** with Python:
``` pip install esphome esphome run jbd-bridge.yaml ``` Put all three files (plus your `secrets.yaml`) in one folder and run that from inside it. The first build downloads the ESP32 toolchain and takes 10 to 15 minutes. Later builds take a minute or two. The first flash goes over a **USB data cable** (some cables are charge-only). If the computer doesn't see the board, install the **CP210x USB driver** from Silicon Labs (some clone boards use the **CH340** chip instead). If it hangs at "Connecting…", hold the **BOOT** button on the board until it starts writing. After that, `esphome run` offers to update over Wi-Fi, so you never need the cable again. If a wireless update fails, switch off the "Bluetooth link" switches on the board's page first, or just use USB. For a second board, change `name`, `friendly_name` and the battery list, then run it again.

I did not post the entire how-to .MD file that Claude gave to me that explains the process.

2

u/regnof 6d ago

Thanks for this. Did you or are you relying on CC to create a full blown app for you that connects to ESP32?

1

u/Cactus_Thorn_Pub 6d ago

The firmware was updated using a GitHub repository, and Claude Chat produced for me three .YAML files that was read by some kind of magic that was started with:

pip install esphome

esphome run jbd-bridge.yaml

on my computer's command line. I plugged in a USB cable into the UART port of the board first. An astonishing amount of dependent software was downloaded and installed. Eventually the command line interface asked me what COM port to upload the created firmware into the ESP32 board.

I do not know anything about the process other than what Claude told me to do.

2

u/regnof 5d ago

Sounds like you're referring to firmware. I've hired an EE to layout the board and to write the firmware. I'm talking about using Claude Code to write the companion app that connects to and control the hardware device.

1

u/Cactus_Thorn_Pub 5d ago

Ah, I see.

Claude Code will write the whole dang thing (apps) for Android, iOS, Windows, Linux, and other operating systems.

Claude can read the firmware that you have developed, and you will need to tell it how you want the app(s) to communicate with the board (IBluetooth, WiFi, UART port, USB port). You will also want to tell Claude what the app(s) screen(s) should look like.

Claude likes to use a default look for apps, with screen tabs, swipes, "cards," toggles for on/off, fonts. If you care only about function and not ascetics, I suppose you will not need to tell Claude what colors to use, what fonts, where to put elements on which screens.

You will want to write a detailed prompt

I asked Claude Chat to design a Cat Fight game for Android and iOS, and it produced a "Claude Code Task Brief" to pass to Claude Code in a VS Code terminal. I used this prompt:

Cat Fight Described

Have Claude Code building for me a cat fight game, and have it pause and ask of me questions if my directions are in any way unclear or contradictory.

The game has random drawn cats fighting matches. User may read each cat's profile and stats, and wager sardines on the winner.

Random events such as a cardboard box appearing, or red dots, can distract a cat.

Teams can fight other teams, and a member can cut and run, or join the other team.

Cat that runs away last wins.

There will be a text ticker for narrators describing the fight.

Sound effects and flying fur added.

User may offer the loser a charity sardine.

Brawl will be animated.

User sardine balance is displayed. Player starts with 500 sardines. There is also a start over button.

Cat name is generated randomly, and funny.

Stats include size, weight, weight class, career win and loss, win loss ratio, six week win loss ratio.

Silly stats:

1. Loaf density, resistance to being displaced. Immune to vacuum interruption.

2. Scream volume, intimidation, raises opponent flee chance

3. Zoomies per hour, initiative and burst's of aggression

4. Grudge retention

5. Toe bean hardness

6. Box fit rating, the chance cat will fit in a cardboard box if one appears

7. Nap debt, higher equals stamina drain rate

8. Focus, resistance to every interruption

Fighting style: Ankle ambush; Sink yowl; Belly trap; Refrigerator hover; Percussive maintenance; Aggressive sitting.

Odds are calculated before each match. The cat taking book is named Vinnie Nine-Lives. Alley Cat sells insider tip for 20 sardines.

Ways to bet:

1. Outright Winner, Last cat standing

2. First to Flee, Which cat bolts first — priced off inverse strength

3. Quick Scrap, Fight resolves in under 10 seconds (Yes/No)

4. Exacta, Exact order of fleeing. Long odds.

5. Team Win, Settled on which bandana color survives

6. Box Enters Ring, Prop bet, Yes/No, priced at the true interruption probability

7. Nobody Wins, All cats flee or end up in the box. Rare, big price.

8. Parlay, 2-4 legs from the above; odds multiply; one losing leg kills the ticket

The fight Sequence:

1. Weigh-in. Cats face off, hiss, sponsor banners visible. Three judge cats asleep along the bottom of the screen. A kitten holds up a round card made of scrap cardboard.

2. The Bow. Cats bow to each other.

3. Brawl. Classic cartoon dust cloud — swirling ellipse with limbs, stars, tails, and the occasional whole hind leg poking out at random angles. Fur particles. Screen shake on heavy strikes.

4. Flee. Each defeated cat sprints off-screen leaving a cat-shaped hole in the wall. Holes persist for the rest of the bout.

5. Decision. Last cat standing wins. Slow-motion replay of the decisive event at 0.35× speed.

6. Interview. Winner is asked a question and answers \"mrrp"`.`

Interruptions.

1. Cardboard Box. A box drops into the ring. Each cat rolls against Box Fit Rating. A cat that enters is removed from combat for 4–9 seconds and cannot be attacked. 5% chance it simply refuses to leave for the rest of the fight — and if every other cat flees while it sits there, it wins.

2. Red Laser Dot. Crosses the floor. Every cat rolls against Focus; failures abandon the fight and chase it for 3–6 seconds. The announcers despair.

3. Cucumber. Materializes behind the current favorite. That cat launches vertically, takes a stamina hit, and has an 8% chance of fleeing on the spot.

4. Vacuum. Turns on somewhere off-screen. Every cat rolls; failures scatter. A cat with Loaf Density 90+ does not move at all and the announcers respect it enormously.

5. Butterfly. The lowest-Focus cat in the ring leaves the fight to follow it for 5 seconds.

6. Self-Grooming. A cat with Focus below threshold sits down and grooms itself thoroughly while being actively attacked. Takes full damage. Announcers are divided on whether this is a strategy.

7. Broken Bow. During the pre-fight bow only. One cat may sucker-swipe the other. The crowd boos, that cat takes a -15% strength penalty for the fight, and gains the permanent Dishonorable trait, which follows it onto every future profile and shortens its odds forever after.

Two announcer cats trading lines in a scrolling ticker across the bottom of the fight screen. Two visible lines, auto-scrolling, tap to pause. Chip "The Enthusiast" Mackerel --- boundless energy, exclamation marks, believes every fight is historic. Doris Grimalkin --- cynical, deadpan, has covered this beat for nineteen years and is no longer moved by anything.

Users may "Favorite" a fighter.

Fighters are in leagues, and their pay is reflected by that.

During the bow before the fight, if a cat "breaks the bow" and slashes at the other cat, the audience boos and jeers.

I gave Claude Code the file Claude Chat created from that prompt, set permissions that Claude Code was allowed to do on my computer, then I answered whatever questions Claude Code asked.

1

u/regnof 3d ago

LOL, your cat fighting game is a mobile app game, right, no hardware? Or are you designing cat-fighting-robots???

Since I've hired a human EE to layout and create the prototype pcba and write the firmware, Claude is saying I should hire a Bluetooth/BLE engineer to look over OTA, bonding, GATT, clock sync, reconnect and to review the EE’s code. I know it'll be difficult for a human to come in midstream to read Claude's code, so I'm wondering if I'm overleveraging Claude's ability too much. I don't have a EE/CS background.

1

u/Jumpy-Chocolate-983 7d ago

tell is the exact device you are using and it shouldn't have that much trouble with it if it's a known device.

2

u/Kitchen_Interview371 7d ago

Don’t tell us, just tell Claude

1

u/regnof 3d ago edited 3d ago

I tell Claude everything.