# Digital dashboard

**URL:** <https://discourse.processing.org/t/digital-dashboard/5861>\
**Category:** Coding Questions\
**Created:** [November 23, 2018, 6:06pm UTC](https://discourse.processing.org/t/digital-dashboard/5861 "2018-11-23T18:06:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![processing1234](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@processing1234](https://discourse.processing.org/u/processing1234)\
**Post date:** [November 23, 2018, 6:06pm UTC](https://discourse.processing.org/t/digital-dashboard/5861/1 "2018-11-23T18:06:21Z")

</div>

hey, for an assignment we have to create a digital dashboard which shows speed in Km/hr, fuel level in liters, RPM. This is the code I’ve done so far. I’d really appreciate any help. Thanks in advance. I’m really new to processing and this task seems very daunting to me.

```auto
Gauge fuelGauge;
int InputDecision;
boolean CallDataInitial = true;

void keyPressed() {
 int keyNum = Character.getNumericValue(key);
 if(keyNum<=3 && keyNum>-1)InputDecision = keyNum;
}

void DataInitial (){
  if (InputDecision==1){
   if(CallDataInitial){
    sensor = new SensorDataProvider("Car_status_BMW_323i.csv"); 
    sensor.initialize();
    myCar= new Car(0.23,60);
    
   speedometer = new Gauge();
   speedometer.setRange(0,400);
   speedometer.setCenterPos(width/2 -400, 350);
   }
    
    
    
  }
  
  
  
  
  
  
}
``
```

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [November 24, 2018, 7:33am UTC](https://discourse.processing.org/t/digital-dashboard/5861/2 "2018-11-24T07:33:18Z")

</div>

Do you get any errors or are you stuck implementing certain feature?

Design your dashboard using pen and paper, or any on the market sketch/mockup software if you are familiar with them. Then defined the functionality of each control and add the description of each control’s visual state. For instance, start with the gas control. Then add that speed gauge and then the RPM gauge.

Notice you do not need to implement these controls. The library `controlP5` or `G4P` provide UI controls that you could use in your project if you like them, or you could design your own.

Kf

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 24, 2018, 11:03pm UTC](https://discourse.processing.org/t/digital-dashboard/5861/3 "2018-11-24T23:03:58Z")

</div>

Is your primary concern how to implement the metrics, or how to draw the display? There are a number of recent discussions on the forum of “gauge”, “dial”, etc. regarding display approaches.

---

<div class="post-metadata">

**Author:** ![processing1234](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@processing1234](https://discourse.processing.org/u/processing1234)\
**Post date:** [November 24, 2018, 11:16pm UTC](https://discourse.processing.org/t/digital-dashboard/5861/4 "2018-11-24T23:16:34Z")

</div>

more so on how to display changing values for each gauge. The values are in a csv file.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 24, 2018, 11:33pm UTC](https://discourse.processing.org/t/digital-dashboard/5861/5 "2018-11-24T23:33:20Z")

</div>

Are you playing back a static csv as an animation, or is the csv being updated on disk and you are periodically reloading it to display the last values…?

---

<div class="post-metadata">

**Author:** ![processing1234](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@processing1234](https://discourse.processing.org/u/processing1234)\
**Post date:** [November 25, 2018, 12:23am UTC](https://discourse.processing.org/t/digital-dashboard/5861/6 "2018-11-25T00:23:06Z")

</div>

the csv has all the data preloaded. nothing is changing or being updated

---

<div class="post-metadata">

**Author:** ![processing1234](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@processing1234](https://discourse.processing.org/u/processing1234)\
**Post date:** [November 25, 2018, 12:26am UTC](https://discourse.processing.org/t/digital-dashboard/5861/7 "2018-11-25T00:26:38Z")

</div>

So its a long list of RPM and fuel levels and i need to have the values changing as if it were a real dashboard in a car.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 25, 2018, 12:37am UTC](https://discourse.processing.org/t/digital-dashboard/5861/8 "2018-11-25T00:37:36Z")

</div>

Then it sounds like you may want to look at using loadTable() to import your csv as a Table, loop over the TableRows every x milliseconds / frames, and update the drawing each frame based on the contents of a TableRow.

- [https://processing.org/reference/loadTable\_.html](https://processing.org/reference/loadTable_.html)
- [https://processing.org/reference/Table.html](https://processing.org/reference/Table.html)
- [https://processing.org/reference/TableRow.html](https://processing.org/reference/TableRow.html)
