DEV Community

vmodal_ai
vmodal_ai

Posted on

Kotlin Android Telemetry Dashboard for NVIDIA Jetson Robots

Kotlin Android Telemetry Dashboard for NVIDIA Jetson Robots

Robot operators need more than camera feeds. Battery, temperature, CPU/GPU load, localization, network quality, and operating mode are equally important.

1. Define telemetry

data class RobotTelemetry(
    val battery: Int,
    val cpuLoad: Float,
    val gpuLoad: Float,
    val temperatureC: Float,
    val networkMs: Long
)
Enter fullscreen mode Exit fullscreen mode

2. Stream telemetry

The Jetson gateway can publish telemetry at a controlled interval.

Jetson sensors
     ↓
Telemetry collector
     ↓
Gateway
     ↓
WebSocket
     ↓
Kotlin Flow
Enter fullscreen mode Exit fullscreen mode

3. Kotlin repository

interface TelemetryRepository {
    fun observe(): kotlinx.coroutines.flow.Flow<RobotTelemetry>
}
Enter fullscreen mode Exit fullscreen mode

4. ViewModel

class TelemetryViewModel(
    private val repository: TelemetryRepository
) : ViewModel() {

    val telemetry = repository.observe()
        .stateIn(
            viewModelScope,
            kotlinx.coroutines.flow.SharingStarted.WhileSubscribed(5000),
            null
        )
}
Enter fullscreen mode Exit fullscreen mode

5. Compose dashboard

@Composable
fun Metric(label: String, value: String) {
    Column {
        Text(label)
        Text(value)
    }
}
Enter fullscreen mode Exit fullscreen mode

Combine metrics into cards for battery, compute utilization, temperature, and network latency.

6. Add health states

Instead of relying only on raw numbers, define explicit states:

enum class HealthState {
    HEALTHY, WARNING, CRITICAL, UNKNOWN
}
Enter fullscreen mode Exit fullscreen mode

The robot should calculate safety-critical states locally. Android should visualize them.

7. Offline behavior

When connectivity disappears:

ONLINE → RECONNECTING → OFFLINE
Enter fullscreen mode Exit fullscreen mode

Do not automatically resend old movement commands after reconnecting. Telemetry can resume, but control commands should be deliberately reissued.

Conclusion

A Kotlin telemetry layer turns a Jetson-powered robot into an observable system and makes fleet operations easier to diagnose.

References

Useful Links

Website: www.v-modal.com

SDK Flutter: https://github.com/v-modal/vmodal_sdk_flutter

SDK Android: https://github.com/v-modal/vmodal_sdk_android

Discord: https://discord.gg/K72z28KUx

Reddit: https://www.reddit.com/r/v_modal/

Top comments (0)