View gist:cdd166ec55d38eed8f3f194373e10800
void ofApp::stringtocolor(string convertstring){ | |
int hash = std::hash<std::string>()(convertstring); | |
int r = (hash & 0xFF0000) >> 16; | |
int g = (hash & 0x00FF00) >> 8; | |
int b = hash & 0x0000FF; | |
cout << r << "| "<< g << "| " << b << endl; | |
} |
View Arduino parse CSV data to array
//libs | |
#include <SPI.h> | |
#include <SD.h> | |
//SD vars | |
File myFile; | |
//parse data vals | |
int dataarr[60] = {}; //array of parsed data | |
int arrpointer = 0; //array pointer |