Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static inline void ADC_Sampling(){
- uint16_t i2s_read_buff[NUM_SAMPLES];
- int num = i2s_read_bytes(I2S_NUM_0, (char*)i2s_read_buff, NUM_SAMPLES * sizeof(uint16_t), portMAX_DELAY);
- //collected_samples += num / sizeof(uint16_t);
- if(Chart_is_ok_to_Send_Data && olvasunk_e){
- for (int i=0;i<NUM_SAMPLES;i++) {
- String json = "";
- json += String((i2s_read_buff[i] & 0xFFF)/ (float)40.95);
- json += "}";
- webSocket.broadcastTXT(json.c_str(), json.length());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement