Hello Everyone.
I am using Teensy3.2
I want to communicate with one IC using I2c protocol i will get value from IC and will do some alterations on it in the place of "hello world" that is mentioned in my code below. And when i enter any special character,pointer will go out from main code just like i am doing in the code below but i want to do this with interrupt.
Is it possible.
Please give me any appropriate solution.
I am using Teensy3.2
I want to communicate with one IC using I2c protocol i will get value from IC and will do some alterations on it in the place of "hello world" that is mentioned in my code below. And when i enter any special character,pointer will go out from main code just like i am doing in the code below but i want to do this with interrupt.
Is it possible.
Please give me any appropriate solution.
Code:
void interrupt ();
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
char val;
// put your main code here, to run repeatedly:
if( Serial.available()>0)
{
val = Serial.read();
if (val == '+' )
{
interrupt ();
}
}
Serial.println("Hello world");
delay(500);
}
void interrupt ()
{
while(1)
{
;
}
}