Sketch:
- TaskHandle_t Task10Handle;
- TaskHandle_t Task11Handle;
- void setup()
- {
- Serial.begin(115200);
- analogReadResolution(12);
- xTaskCreatePinnedToCore(Task10, "Task-10", 2048, NULL, 1, &Task10Handle, 1);
- xTaskCreatePinnedToCore(Task11, "Task-11", 2048, NULL, 2, &Task11Handle, 1);
- }
- void loop() {}
- void Task10(void *pvParameters)
- {
- while (true)
- {
- int analogValue34 = analogRead(34);
- Serial.print("ADC1_6: "); Serial.println(analogValue34);
- vTaskDelay(pdMS_TO_TICKS(1000)); //
- }
- }
- void Task11(void *pvParameter)
- {
- while (true)
- {
- int analogValue35 = analogRead(35);
- Serial.print("ADC1_7: "); Serial.println(analogValue35);
- vTaskDelay(pdMS_TO_TICKS(1000)); //
- }
- }