Search found 18 matches

by geomanfred
Thu Jul 14, 2022 11:03 am
Forum: General
Topic: Switch and IOC Error
Replies: 6
Views: 1389

Re: Switch and IOC Error

Thank you for the clarrification about switch old value. The 2D panel code works fine in simulation, if there is not breakpoint and if I am not too fast by clicking the pushbutton or too fast after simulation just starts. But if I am too fast or if I assign a breakpoint in the interrupt subroutine a...
by geomanfred
Thu Jul 14, 2022 10:53 am
Forum: General
Topic: UART Console
Replies: 13
Views: 2932

Re: UART Console

But during simulation, why do I see the data only as in the below picture and not as in the link below?
In the other tabs of the console is nothing.
https://www.flowcode.co.uk/wiki/index.p ... e_Tools%29
UART.png
UART.png (235.23 KiB) Viewed 987 times
by geomanfred
Tue Jul 12, 2022 1:41 pm
Forum: General
Topic: Switch and IOC Error
Replies: 6
Views: 1389

Re: Switch and IOC Error

Thank you for the info with 1 single interrupt at a time and for the corrected code. Indeed it works now in simulation as well with real hardware. Could please explain a bit why was necessary to use PB_Old ? Why the PB_State is changing its value all the time? I was expecting that PB_State to be alw...
by geomanfred
Tue Jul 12, 2022 11:51 am
Forum: General
Topic: Switch and IOC Error
Replies: 6
Views: 1389

Re: Switch and IOC Error

I have tested with 2D panel and also with 3d panel, the same working code from previous post above.
And I got a a fatal error in 2D simulation, Flowcode shuts down.
In reality the code works, also the one with 2D panel.
Flowcode Error.png
Flowcode Error.png (192.14 KiB) Viewed 1382 times
by geomanfred
Tue Jul 12, 2022 10:22 am
Forum: General
Topic: Switch and IOC Error
Replies: 6
Views: 1389

Switch and IOC Error

Hello, I want to read the switch/pin state and have a counter going cyclic 0, 1, 2, 3. Encoder is connected to PortD pins 2,3 and the pushbutton to PortD pin 4, each component activating its own IOC interrupt. The sketch “Switch IOC_FC9.fcfx” works fine in simulation as well in reality. The sketch “...
by geomanfred
Mon Jul 11, 2022 11:33 am
Forum: General
Topic: Quadrature encoder and OLED with Arduino
Replies: 3
Views: 978

Re: Quadrature encoder and OLED with Arduino

Hi, The next code works for me with interrupt on change on Arduino Port D, including Pushbutton state. I noticed there is a debouncing in ms for the pushbutton. I expect is the same, probably hidden, for the encoder inputs A and B too. In Arduino IDE there are many ways how a debouncing can be imple...
by geomanfred
Fri Jul 08, 2022 12:30 pm
Forum: General
Topic: Quadrature encoder and OLED with Arduino
Replies: 3
Views: 978

Quadrature encoder and OLED with Arduino

Hello, I would like to test how an quadrature encoder component works and to show its counter on my OLED. From hardware point of view everything is fine, because it works nice with Arduino IDE. I used the code from examples of Rotary Encoder component page: https://www.matrixtsl.com/wiki/index.php?t...
by geomanfred
Wed Jul 06, 2022 9:00 am
Forum: General
Topic: UART Console
Replies: 13
Views: 2932

Re: UART Console

But in the end, I do not know if I can achieve a similar “Serial Monitor” as in Arduino IDE. Do I have to use an external software to monitor the serial port, which is in fact my USB programming port of Arduino? Or can I see all the data inside to Flowcode Console? I also see next application exampl...
by geomanfred
Wed Jul 06, 2022 8:47 am
Forum: General
Topic: UART Console
Replies: 13
Views: 2932

Re: UART Console

Hi, Attached is the example that I have used. But now the problem is solved. It came up a notice in this morning to update the components as you can see in the attached picture below. I have tested the example before update and did not work properly. After update it works properly. The problem is so...
by geomanfred
Wed Jul 06, 2022 8:35 am
Forum: General
Topic: Arduino Mega R3 and gLCD SH1106 SPI
Replies: 9
Views: 1990

Re: Arduino Mega R3 and gLCD SH1106 SPI

Thank you very much Martin!
That solved indeed the "flickering" problem too and the OLED displays smooth the numbers.