Problem reading digital pin value (Arduino UNO)


#1

I’m a technology teacher and I use mBlock V5 to control Arduino Uno boards in connected mode.
This morning it was impossible to read digital pins (push button).
It worked perfectly a few weeks ago.
We tested it, and it’s possible to read analogue pins and write logic pins.
Do you have an explanation? Are you experiencing the same problem?
Have the Arduino Uno drivers been updated?

Thank you in advance for your feedback.
For your information, we have relaunched an old mBlock V2 and everything is working perfectly.

Translated with DeepL.com (free version)


#2

Hi @vitry, the issue may be that mBlock update to version 5.4.3 has caused a few errors. Are you using mBlock version 5.4.0 or 5.4.3 (as far as the new version)? And what does your code look like?

Thanks for your time,
Best_codes


#3

Hi,
thanks for your answer, we are using the version 5.3.5 in the school.
We tried différents codes all in block mode, the simplest one.
blocks%20reading%20probl%C3%A8me|677x213

thanks for all


#4

Try the online version (https://ide.mblock.cc/) and try version 5.4.0 and 5.4.3 if possible, please. Also, I can’t see your image. :frowning: Please fix it. Thanks!


#5

Hi,
I have try the 5.4.3 : the block “read digital pin” is in red collor instead of blue.
I have try the 5.4.0, version, the 5.3.5 version, the online version it is impossible to read digital pin, I have try différent Arduino Uno board, différent computer (at school, personal at home and a macbook). Each time it is the same result impossible to read digital pin, but it is possible to read analog pin and write digital pin.
I have used old working programmes and news ones, the result is the same…

thanks for all
Glenn


#6

This is indeed strange because I have no issues. May I see a screenshot of your code, and what device you are using? Thanks! @vitry


#7

YEs, this is strange the same activity, the same material, the same code, same computer working properly at the beginning of the month of December 2023, no changes for us… but no more working

We are using Arduino Uno board (Chinese version)
I think I have some problème to upload image.
The code is very simple :
Green flag
Forever
Set the variable to read digital pin

The same code with “read analog pin” works good

blocks


#8

How is the variable going to show you what the value is?


#9

The variable is on the screen in the mBlock software


#10

@vitry Are you using live mode? If you don’t use live mode then there is no way that the value can update. Also, the block you’re using is a boolean, but it may still work. Thanks!


#11

YEs we work in live mode.
We do exactly the same way for 4 or 5 years, it have alway good working


#12

@vitry Contact mBlock about the issue via their email (support@makeblock.com) and I will do some of my own troubleshooting. I currently don’t have the issue. The device might be updated and have a bug, so I’ll check. Good luck!


#13

Hi, I’m an italian teacher and I have the same problem described by vitry. In my laboratory some pc’s has this problem and other no. The same hardware (Arduino Uno, cable and pushbutton) connected to another pc is working fine. If I try the old version 3 of mblock (Old version V 3.4.12) the system is OK.
Do you have fixed the problem?


#14

@lucafl77 The issue has been reported but the problem isn’t fixed yet. I’m still looking for some good workarounds.