I have accessed Jotham Gates Githib site – how do I now load his firmware onto my Cosmic Watch v2 muon detector?
Good — if you’ve already reached Jotham Gates’ GitHub, you’re basically at the correct “modified firmware” stage. The next step is just getting it onto the Arduino Nano inside the CosmicWatch v2.
Here’s a clear, practical upload procedure (works for his “NonOfficial-Stuff…” firmware and most v2 forks):
🔌 1. What you need first
Make sure you have:
- CosmicWatch v2 connected via USB (Arduino Nano inside)
- Arduino IDE installed (or PlatformIO, but IDE is simpler)
- Correct USB driver:
- Usually CH340 driver (very common for Nano clones)
- GitHub repo downloaded as ZIP or cloned
From Jotham Gates’ page:
- You should be using the repo called something like
“NonOfficial-StuffForCosmicWatchMuonDetectors”
📥 2. Download the firmware properly
From GitHub:
- Open the repository
- Click Code → Download ZIP
- Extract it somewhere easy (Desktop or Documents)
Inside you should find:
.inoArduino sketch OR PlatformIO project- possibly multiple firmware variants
🧠 3. Open the correct file
If it’s Arduino-based:
Look for something like:
CosmicWatch.inomain.ino- or a folder containing
.ino
Open it in:
Arduino IDE → File → Open
⚙️ 4. Set up Arduino IDE correctly
Go to:
Tools menu:
- Board: Arduino Nano
- Processor: ATmega328P (try BOTH options if upload fails)
- “Old Bootloader” (very common for clones)
- “ATmega328P”
Port:
- Select COM port that appears when plugged in
📚 5. Install required libraries (important)
Most CosmicWatch firmware needs:
In Arduino IDE:
Sketch → Include Library → Manage Libraries
Install:
- Adafruit SSD1306
- Adafruit GFX
- TimerOne
- EEPROM (usually built-in)
- SD (built-in)
If Jotham’s fork adds extras, the README will list them.
⬆️ 6. Upload firmware
Click:
✔ Upload (right arrow button)
Watch the bottom console.
If it works, you’ll see:
- “Uploading…”
- “Done uploading”
⚠️ 7. If upload fails (very common)
Try these in order:
Fix 1: Wrong bootloader
Change:
- Tools → Processor → “ATmega328P (Old Bootloader)”
Fix 2: USB cable issue
- Must be data cable, not charge-only
Fix 3: COM port wrong
- Unplug/replug and reselect port
Fix 4: Reset timing
- Press reset on Nano just before upload starts
📊 8. After upload
If Jotham’s firmware is installed correctly:
You should see:
- OLED still works
- SD card logging enabled simultaneously
- Serial monitor may show debug output
- no need to switch “modes” manually
This is the key improvement of his fork:
OLED + SD logging at the same time (non-blocking structure improvements)
🧪 If you want a sanity check
Tell me:
- what exact folder/files you downloaded
- whether you’re using Nano clone or original ATmega328P
- whether OLED or SD currently works on stock firmware
and I can walk you through that exact repo structure line-by-line so you don’t have to guess anything.
You said correct usb drive ch340 what do I need to do here.
Right — this is the bit that trips most people up, but it’s straightforward.
CH340 is not a “USB drive”. It’s the USB-to-serial chip driver your Arduino Nano clone uses so your computer can talk to it.
If the driver isn’t installed (or is wrong), the board won’t show up as a usable COM port in Arduino IDE.
🔧 What you need to do (CH340 setup)
🪟 Windows (most likely case)
1. Plug in your CosmicWatch v2
Use a data-capable USB cable.
2. Check Device Manager
Right-click Start →
Device Manager
Look under:
- Ports (COM & LPT)
You should see something like:
- “USB-SERIAL CH340 (COMx)” ✔ GOOD
OR if it’s broken:
- “Unknown device”
- or nothing appears ❌
📥 3. If CH340 is NOT showing properly
You need the driver installed.
Install CH340 driver:
Search and install:
- “CH340 driver WCH official”
After install:
- unplug Nano
- plug it back in
🔍 4. Confirm it worked
Back in Device Manager:
✔ Good result:
- “USB-SERIAL CH340 (COM3/4/5 etc.)”
That COM number is what Arduino IDE uses.
⚙️ 5. Select it in Arduino IDE
Go to:
- Tools → Port → select the COM port
Example:
- COM3 (CH340)
🚨 If you don’t see any COM port at all
Check these:
A. Bad USB cable (very common)
- Try another cable
- Must support data, not just charging
B. Wrong USB port/hub
- Plug directly into PC (not hub)
C. Clone uses different chip (less common)
Some Nano boards use:
- FTDI (different driver)
- CP2102 (Silicon Labs driver)
🧠 Quick mental model
Think of it like this:
- Arduino Nano = “radio telescope receiver”
- CH340 driver = “translator so your PC understands it”
- COM port = “frequency channel it appears on”
Without CH340, your computer can’t “hear” the board.
👍 Once CH340 is working
You can proceed to:
- selecting board: Arduino Nano
- selecting processor: ATmega328P (Old Bootloader often needed)
- uploading CosmicWatch firmware
If you want, tell me what you see in Device Manager and I’ll diagnose it instantly (even a screenshot description is enough).
Where is upload option.
In the Arduino IDE, the upload option is the arrow button.
⬆️ Where to find “Upload”
🧭 Top-left of Arduino IDE window
You’ll see a row of icons. Look for:
- ✔ Tick mark = Verify (compiles code only)
- ➡️ Right-pointing arrow = Upload
That right arrow button is what sends the firmware to your CosmicWatch board.
⚡ What happens when you click it
When you press Upload (➡️):
- Code is compiled first (you’ll see “Compiling…”)
- Then it transfers to the Nano over USB
- You’ll see:
- “Uploading…”
- then “Done uploading”
🧠 Important distinction
- ✔ Verify (tick): checks code only, nothing sent
- ⬆️ Upload (arrow): actually installs firmware on the device
🚨 If you don’t see the upload button
That usually means:
- You don’t have a sketch open (
.inofile not loaded yet) - Or Arduino IDE didn’t fully install
Fix:
File → Open → select the .ino file from the GitHub folder
🔌 Before pressing Upload (quick checklist)
Make sure:
- Board: Arduino Nano
- Port: COM port selected (CH340)
- Processor: try ATmega328P (Old Bootloader) if needed
- USB cable is connected
If you want, tell me what you see on your screen right now (or what Arduino IDE version you’re using), and I can guide you exactly where everything is.
I got this Upload error: Failed uploading: uploading error: exit status 1.
That message is unfortunately very generic in Arduino IDE — it just means the upload process failed, not why. With CosmicWatch v2 + Nano clones, there are a few very common causes.
Let’s fix it systematically.
🔧 Step 1 — Check the real error message
In Arduino IDE, look at the black console at the bottom.
Scroll up and look for lines like:
avrdude: stk500_recv(): programmer is not respondingnot in syncaccess deniedport not found
If you can tell me that exact line, I can pinpoint it instantly.
⚡ Step 2 — Most common fixes (try in order)
✅ 1. Wrong processor (MOST COMMON for Nano clones)
Go to:
Tools → Processor
Try switching between:
- ATmega328P
- ATmega328P (Old Bootloader) ← try this first
Then upload again.
✅ 2. Wrong port
Go to:
Tools → Port
Make sure you select something like:
- COM3 (CH340)
- COM4 etc.
If no COM port appears:
- USB cable/driver problem
✅ 3. CH340 driver issue
If Device Manager does NOT show:
- “USB-SERIAL CH340”
Then upload will fail every time.
Fix:
- reinstall CH340 driver
- unplug/replug board
✅ 4. USB cable problem (very common)
Many “charging cables” do NOT transmit data.
Try:
- different USB cable
- different USB port (no hub)
✅ 5. Board selection wrong
Go to:
Tools → Board
Must be:
- Arduino Nano
(Not Uno, not Mini, not ESP32 etc.)
⚠️ 6. Reset timing trick (helps a lot)
Some Nano clones need manual reset:
- Click Upload
- When you see “Uploading…”
- Press RESET button on Nano once
🧪 7. If still failing
Try this sequence:
- unplug USB
- close Arduino IDE
- reopen IDE
- plug board back in
- reselect COM port
- upload again
🧠 What this error usually means (in plain terms)
“exit status 1” =
“The computer tried to talk to the Arduino, but the Arduino didn’t respond correctly.”
Almost always:
- wrong bootloader setting OR
- wrong COM port OR
- driver/cable issue
👍 If you want fast diagnosis
Reply with:
- what COM port you see (if any)
- what “Processor” is set to
- the full black console error text
I’ll tell you exactly which one it is in one step.
Cannot set com-ststr for \.\COM13 unable to open port COM13
That error is very specific:
“unable to open port COM13”
means Windows has the port listed, but Arduino IDE cannot access it
So the problem is not your code — it’s the serial connection layer (driver / port lock / cable / board state).
🔧 Fix it in order (this will usually solve it quickly)
✅ 1. Close anything using COM13
Very common cause.
Close:
- Arduino Serial Monitor
- Any other Arduino IDE windows
- Python / PuTTY / SDR software / terminal apps
Then:
- unplug Nano
- wait 5 seconds
- plug back in
✅ 2. Re-select the port
In Arduino IDE:
Tools → Port → select COM13 again
Sometimes Windows keeps stale COM assignments.
⚡ 3. Change USB port (important)
Try:
- different USB socket on your PC
- avoid USB hubs/dongles
Then check if COM number changes (COM13 → COM4 etc.)
🔌 4. Cable check (VERY common on CosmicWatch builds)
Make sure USB cable is:
- data-capable (not charge-only)
If unsure → try another cable immediately.
🧠 5. CH340 driver reset
Even if COM13 appears, driver can be stuck.
Do this:
- Device Manager → Ports
- Right-click USB-SERIAL CH340 (COM13)
- Uninstall device (tick “delete driver” if shown)
- Unplug board
- Reinstall CH340 driver
- Plug back in
🔁 6. Reset the Nano at upload time
Some boards lock the port unless reset is triggered.
Try:
- click Upload
- when “Uploading…” appears
- press RESET once on Nano
🚨 7. COM port is “ghost locked” (Windows issue)
If COM13 still refuses:
Do this:
- Restart PC
- plug board in FIRST
- open Arduino IDE AFTER
This clears stuck COM handles.
🧪 What this usually means in practice
For CosmicWatch v2 setups, this error is almost always one of:
- another program is holding COM13
- CH340 driver glitch
- bad USB cable
- stale COM port assignment
NOT firmware-related.
👍 Fast diagnostic question
If you want, tell me:
- Does COM13 disappear/reappear when you unplug the Nano?
- What shows in Device Manager under “Ports”
I can narrow it down to a single cause immediately.
Disappears usb-serial ch340 (com13)
Good — that’s actually useful behaviour to observe.
If USB-SERIAL CH340 (COM13) disappears when you unplug the board, it means:
✅ Driver is working
✅ USB cable is (probably) data-capable
❌ The issue is happening at connection/opening stage, not detection
So we focus on why the port can’t be opened when Arduino IDE tries to use it.
🔧 Most likely causes (in order)
⚠️ 1. Something is already locking COM13
Even if you didn’t open Serial Monitor, it can still be stuck.
Fix:
- Close Arduino IDE completely
- Reopen it fresh
- Do NOT open Serial Monitor
- Try upload again
Also check:
- Task Manager → kill any
java.exe/ Arduino processes if needed
🔌 2. Bad USB reset timing (VERY common on Nano clones)
Try this exact sequence:
- Click Upload
- Wait until you see:
- “Uploading…”
- Press RESET button on Nano once
This forces bootloader mode and often fixes COM lock issues.
⚙️ 3. Wrong bootloader setting (important for CosmicWatch Nanos)
Go to:
Tools → Processor
Try:
- ATmega328P (Old Bootloader) ← most likely correct
- then retry upload
If wrong, COM opens but upload fails or locks.
🔁 4. Windows COM port glitch (stuck handle)
Do this clean reset:
- Unplug Nano
- Restart PC
- Plug Nano back in
- Open Arduino IDE
- Select COM13 again
- Upload
This clears hidden port locks.
🧠 5. CH340 driver partially OK but unstable
If it still fails intermittently:
- uninstall CH340 driver in Device Manager
- reinstall official WCH CH340 driver
- reboot again
⚡ Quick interpretation of your symptom
You said:
“Disappears USB-SERIAL CH340 (COM13)”
That tells us:
- board is detected correctly
- driver works
- problem occurs only when Arduino IDE tries to open the port
👉 This strongly points to: bootloader timing or port lock issue, not hardware failure
🧪 Fastest thing to try next
Do this exactly:
- Set:
- Board: Arduino Nano
- Processor: ATmega328P (Old Bootloader)
- Unplug USB
- Plug back in
- Click Upload
- Press RESET once when “Uploading…” appears
👍 If it still fails
Tell me:
- what processor option you selected
- whether COM13 changes number when replugging
- exact Arduino IDE version
and I’ll narrow it down to a single definitive fix.
ATmega328P (Old Bootloader); COM13 does not change; Arduino IDE 2.3.10
Good — that actually narrows it down a lot. At this point your setup is correctly detected (CH340 + fixed COM port), so we are no longer dealing with drivers or basic USB issues.
This becomes a bootloader / port-opening timing problem or a hang on the Nano during reset/upload.
Let’s fix it in the most reliable order for Arduino IDE 2.3.10 + Nano clones (CosmicWatch v2 is a classic case).
—
🔧 1. Try manual bootloader entry (most effective fix)
The Nano bootloader only listens for uploads for a short window.
Do this exactly:
1. Click Upload
2. Wait until Arduino IDE shows:
“Uploading…” (bottom bar)
3. Immediately press RESET on the Nano once
If timing is right:
COM13 will stay
upload will proceed past avrdude stage
—
🔧 2. Force a clean serial reset (important in IDE 2.3.x)
Arduino IDE 2.x sometimes leaves background serial handlers active.
Do this:
Close Arduino IDE completely
Open Task Manager
End any of:
Arduino IDE
Java / Arduino background processes
Then:
reopen IDE
try upload again
—
⚙️ 3. Lower upload stability sensitivity (common Nano fix)
Go to:
> Tools → Upload Speed
Set:
57600 baud (try this even if default is 115200)
Many CH340 Nano clones are unstable at higher upload speeds.
—
🔌 4. USB port change (not cable this time — port only)
Even if COM13 is stable, Windows USB stack can still misbehave.
Try:
different USB port (prefer USB 2.0 if available)
avoid front-panel ports
—
🧠 5. Very likely underlying issue (CosmicWatch-specific)
CosmicWatch v2 Nano boards often have:
marginal bootloader timing
slightly non-standard reset circuit
CH340 with slow DTR reset response
So Arduino IDE may:
> open port → try reset → miss bootloader window → fail with “unable to open port”
That’s why manual RESET during upload works so often
—
🧪 6. If still failing: bypass IDE reset entirely
Try this stronger method:
1. Press and hold RESET on Nano
2. Click Upload
3. When “Uploading…” appears → release RESET
This forces bootloader listening state.
—
🚨 7. Rare but possible issue
If none of the above works:
bootloader may be corrupted
or wrong fuse settings on Nano clone
Then solution becomes:
reburn bootloader using another Arduino or ISP programmer
—
👍 What I think is happening in your case
Given:
CH340 detected correctly
COM13 stable
Old Bootloader already selected
IDE 2.3.10
👉 This is classic Nano timing mismatch during upload start
So the fix is almost always:
> RESET timing during upload OR upload speed reduction
—
✔️ Try this first (highest success rate)
1. Set Old Bootloader
2. Set Upload Speed = 57600
3. Click Upload
4. Press RESET once when “Uploading…” appears
—
If it still fails, tell me exactly what the bottom console says after retry — we’ll get it down to a single definitive cause.
I can’t see upload speed on tools.
That’s normal in Arduino IDE 2.3.10 — the menu layout is different from older tutorials.
In IDE 2.x, Upload Speed is hidden unless the correct board/core is fully selected and expanded.
Let’s sort it properly.
⚙️ Why you can’t see “Upload Speed”
In Arduino IDE 2.3.10:
- Upload speed only appears for boards where it is exposed by the core
- For Arduino Nano (AVR / ATmega328P) it should appear, but sometimes the menu is collapsed or not fully loaded until the board package is correct
🔧 Step 1 — Make sure correct board package is installed
Go to:
Tools → Board → Boards Manager
Search:
- “Arduino AVR Boards”
Make sure it is installed (or updated)
You want:
- Arduino AVR Boards (by Arduino)
🔧 Step 2 — Select board properly
Go to:
Tools → Board
Then choose:
- Arduino Nano
Not “Nano Every” or any clone variant.
Then re-check Tools menu.
🔍 Step 3 — Where Upload Speed should appear
Once correct board is selected, it should show:
Tools → Upload Speed → 115200 (or 57600 etc.)
If you still don’t see it, it’s not critical — we can still fix your issue without it.
🚨 Important point (for your specific error)
Given your earlier error:
“unable to open port COM13”
👉 Upload speed is NOT the root problem.
So don’t worry if it’s missing — it’s not what’s blocking you.
🔧 What actually matters for your setup right now
Focus on this instead:
✔ Correct settings:
- Board: Arduino Nano
- Processor: ATmega328P (Old Bootloader)
- Port: COM13
✔ Then use this upload method:
- Click Upload
- Wait for “Uploading…”
- Press RESET on Nano once
🧠 Key insight
In IDE 2.x:
- Upload speed is no longer a reliable troubleshooting tool
- Reset timing + bootloader selection matters much more for CH340 Nano clones (like CosmicWatch v2)
👍 If it still fails after this
Tell me:
- what appears in the black console after a failed upload
- whether pressing RESET changes anything
and I’ll pinpoint the exact failure stage in one step.
I pressed reset as soon as uploading… appeared. Got not in sync: resp=0x00 error 10 times then it failed
That message is actually very diagnostic:
“not in sync: resp=0x00”
This means: 👉 The PC is talking to the USB-serial chip, but
👉 the ATmega328P bootloader is NOT responding at all
So we are no longer dealing with COM ports or CH340.
We are dealing with one of these three things:
🔴 What this error REALLY means
1. Bootloader is not running (most likely)
The Nano is not entering upload mode.
2. Wrong reset timing / auto-reset not working
DTR reset pulse is failing.
3. Bootloader missing or corrupted (very common on clones)
Especially with CH340 Nano boards.
🔧 Step-by-step fix (do in order)
⚡ FIX 1 — Manual bootloader entry (important)
Do this very precisely:
- Click Upload
- Watch console until you see:
- “Uploading…”
- NOW press RESET and HOLD it
- Wait 2 seconds
- Release RESET
If it still fails → try next fix.
⚙️ FIX 2 — Try opposite processor option
Go to:
Tools → Processor
Switch to:
- ATmega328P (not Old Bootloader)
Then upload again using same reset timing.
👉 This mismatch alone causes EXACTLY your error.
🔌 FIX 3 — USB port behaviour fix
Unplug Nano completely:
- Unplug USB
- Wait 10 seconds
- Plug back in
- Select COM13 again
- Upload immediately
Then use reset timing again.
🧠 FIX 4 — Bootloader likely issue (important insight)
If ALL of the above still gives:
“not in sync: resp=0x00”
Then your Nano likely has:
- missing bootloader OR
- corrupted bootloader OR
- wrong fuse settings (common CH340 clones)
🧪 How to confirm bootloader failure
If bootloader is broken:
- COM port still appears ✔
- Upload ALWAYS fails ❌
- “resp=0x00” repeats every time
This is exactly what you’re seeing.
🛠️ If it is bootloader damage (next step)
You have 2 options:
Option A (best)
Re-burn bootloader using:
- another Arduino (as ISP)
- or USBasp programmer
Option B (easier if available)
Replace Nano (they’re cheap clones often < £5–£10)
🧠 What I think is happening in your CosmicWatch v2
Given:
- CH340 works
- COM13 stable
- Old Bootloader already tried
- reset timing attempted
- still “resp=0x00”
👉 80–90% probability: bootloader problem or wrong fuse/clone variant
👍 What I need from you to confirm instantly
Reply with:
- Does the Nano show a blink LED pattern when you press reset?
- Does upload ever briefly start (TX/RX LEDs flicker)?
- Is your Nano definitely a clone (CH340 suggests yes)
If you want, I can also walk you through .