# Updating Guide 5-based user\_code.cpp for v0.13.1 or v0.13.2

**URL:** <https://bristlemouth.discourse.group/t/updating-guide-5-based-user-code-cpp-for-v0-13-1-or-v0-13-2/533>\
**Category:** Dev Kit Support\
**Created:** [July 30, 2025, 4:09pm UTC](https://bristlemouth.discourse.group/t/updating-guide-5-based-user-code-cpp-for-v0-13-1-or-v0-13-2/533 "2025-07-30T16:09:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timjoh](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@timjoh](https://bristlemouth.discourse.group/u/timjoh)\
**Post date:** [July 30, 2025, 4:09pm UTC](https://bristlemouth.discourse.group/t/updating-guide-5-based-user-code-cpp-for-v0-13-1-or-v0-13-2/533/1 "2025-07-30T16:09:54Z")

</div>

Hello,

I just updated a `user_code.cpp` based on hello\_world\_guide\_5 to compile with v0.13.1 and am looking for feedback on my approach.

Issue 1) contents of `bm_network.h` moved to `spotter.h` and renamed slightly

Solution:

- replace `#include “bm_network.h”` with `#include “spotter.h”`
- replace `BM_NETWORK_TYPE_CELLULAR_IRI_FALLBACK` with `BmNetworkTypeCellularIriFallback`

Issue 2) pubsub changes

Solution:

- replace `#include “bm_pubsub.h”` with `#include “pubsub.h”`

Issue 3) deprecation of various `bm_printf()` - style functions in favor of `spotter_log()`

Solution:

- remove `#include “bm_printf.h”` include
- change `bm_fprintf()`calls to `spotter_log()`, add the parameter `USE_TIMESTAMP`between the filename and text string
- change `bm_printf()` calls to `spotter_log_console()`

Issue 4) proper format strings for variables

Solution:

- change some `%d` formats to `%lu` or `%u` as appropriate

What else might go into adapting a user\_code.cpp to v0.13.1 or v0.13.2?

Thanks
