# Turn gauge arc into gradient

**URL:** <https://discourse.processing.org/t/turn-gauge-arc-into-gradient/4103>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [October 3, 2018, 11:18pm UTC](https://discourse.processing.org/t/turn-gauge-arc-into-gradient/4103 "2018-10-03T23:18:47Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![tony](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tony/32/949_2.png) [@tony](https://discourse.processing.org/u/tony)\
**Post date:** [October 4, 2018, 6:31pm UTC](https://discourse.processing.org/t/turn-gauge-arc-into-gradient/4103/10 "2018-10-04T18:31:52Z")

</div>

> [@Interalia](#):
>
> you saw, list contains two elements

It only contains 2 elements if the serial Port delivers 2 values.  
Take a look at this thread:

> [@\[SOLVED\] ArrayIndexOutOfBoundsException: 1](https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288):
>
> Using an arduino Mega to collect temperature and humidity data then using Processing to display data on meters. Everything works fine for a few seconds then I receive this error: ArrayIndexOutOfBoundsException: 1. Not sure why? Arduino Code: #include \<Wire.h\> #include "Wire.h" #include "Adafruit\_HTU21DF.h" #include \<SPI.h\> #include \<SoftwareSerial.h\> extern "C" { #include "utility/twi.h" // from Wire library, so we can do bus scanning } uint8\_t readline(char \*buff, uint8\_t maxbuff, uint16\_t…

---

_[View the full topic](https://discourse.processing.org/t/turn-gauge-arc-into-gradient/4103)._
