Hello world
I need some help with my code.
#include <SPI.h>
#include<SPIMemory.h>
SPIFlash flash;
int val[20];
void setup() {
Serial.begin(115200);
flash.begin();
}
void loop() {
for(int i = 0; i <= 20; i++){
val[i] = flash.readByte(i);
}
Serial.println(val[1]);
delay(10000);
}
Arduino uno reads data from flash chip and the values are saved in array (int val[20]). Data here looks like this:
val[1] = 64
val[2] = 176
val[3] = 14
...
val[20] = 255
I want to transform this array data to look like this:
64-176-14-...255
This value could be some different type (String).
There must be a special character to mark place between two values. In my case this is "-"
Is there any idea how to do this?
Thank you so much