instrumentek
Well-known member
Hi;
I have an issue where intervalTimer runs until I call my display to print. I'm thinking its a conflict of some kind. I cut down the program to demonstrate the issue. I'm using:
- Teensy LC
- Teesny loader 1.27
- arduino IDE 1.6.3
- nokia 5110 display
Have tried different display commands, only the ".display" causes the timer to stop. I tried adding a priority, makes no difference
Thanks for any input
I have an issue where intervalTimer runs until I call my display to print. I'm thinking its a conflict of some kind. I cut down the program to demonstrate the issue. I'm using:
- Teensy LC
- Teesny loader 1.27
- arduino IDE 1.6.3
- nokia 5110 display
Have tried different display commands, only the ".display" causes the timer to stop. I tried adding a priority, makes no difference
Code:
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
Adafruit_PCD8544 MyDisplay = Adafruit_PCD8544(13, 12, 8, 10, 11);
IntervalTimer MyTimer;
void setup()
{
pinMode(9, OUTPUT);
MyTimer.begin(MyFunction, 200000);
MyTimer.priority(1);
}
void loop() {
MyDisplay.print("test"); // timer working
delay(5000); //timer working
MyDisplay.display(); // timer stops after 5 secconds
}
void MyFunction(void)
{
digitalWrite(9, 1);
delayMicroseconds(30000);
delayMicroseconds(30000);
delayMicroseconds(30000);
digitalWrite(9, 0);
}
Thanks for any input