unable to upload code onto Arduino Uno R3

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

unable to upload code onto Arduino Uno R3

Post by Chris Powell »

I am still having problems with Flowcode 8, We now have the software working, but when the students try to compile their programme to the Arduino, I am getting AVR issues, such as

avrdude.exe:stk500_recv() programmer is not responding
or
avrdude.exe:stk500_getsync() attempt 1 of 10:not in sync:resp=0x00

Sometimes I am getting :
avrdud.ex done. Thank you.
Error returning from [avrdude]
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avrc_arduino error code
or
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat reported error code 1
The programme looks ok in flowcode, and is able to work on the simulator, the trouble comes with uploading this to the Arduino. It appears that the compiler throws and error, then does not write to the microcontroller.
This is a college computer, so I am not sure if the college environment is causing problems, or it is the Flowcode side.

We are using the Arduino Uno R3

I am not sure if you want any other information, if so please let me know

thanks

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by medelec35 »

Hi Chris, can you post a flowchart that does not compile please.
Also best to have the Ardunio plugged in before running flowcode.
Once I check flowchart will help further.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Benj »

Hello,

In the Project Options can you check the COM port is correct for the Arduino.

Also can you check the device manager to make sure it can see the Arduino and the USB drivers are installed.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by medelec35 »

So you know what to look out for here is my set up:
Ardunio Setup.png
Ardunio Setup.png (172.31 KiB) Viewed 6657 times
Of course your com port is probably a different number.
Martin

Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Chris Powell »

Thanks for your quick response.
First Martin, sorry about the delay over the I2C 1602 issue, I have let it slip as other items have had a higher priority

Ok
checked the device manager and it is recognising the Arduino Uno (com 7) as well as the project Option.
I will include the code, the weird thing about this is it looks intermittent, (I ran this programme several times before the avrdude error shows up.
In class yesterday I had a couple of students with this problem and as this is a simple programme retyped it and all appeared to work?
I also forgot to mention, the 2LSB are connected to Do and D1, Sometimes a warning appears saying that I have to remove the load from these two pins (TX and RX) then reconnect, doing so does not rectify this problem.
I hope this helps?
Attachments
led array pot.hex
(541 Bytes) Downloaded 159 times
led array pot.msg.txt
(3.71 KiB) Downloaded 170 times
led array pot.fcfx
(7.67 KiB) Downloaded 162 times

Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Chris Powell »

I have another programme (from home now). Both Device manager and Flowcode 8 acknowledges that the arduino uno R3 (PDIP) is feed from coms port 10.
I am not too sure about adding files and the command Place inline?

analogue write leds array.fcfx
(8.93 KiB) Downloaded 182 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by medelec35 »

For the intermittent programming, Have you tried installing Arduino IDE so their drivers get installed?
Sorry, this issue I have not experienced,
so some guess work going on.
Another thing to try is unplugging then plugging Arduino back in to USB.
Martin

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by LeighM »

Try removing anything from Port D and reset the board whilst the attempted programming is in progress

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by mnf »

I've encountered something similar..

I find I need to change to a different port in FC okay it. Then back to project options and change back to the required port. This can be a problem if there is only the one port ((but I have a couple of bluetooth to USB set up - so I'm always good)

I'm not sure if this is correct - but it seems more prevalent with Chinese clone (ch340) boards. Also if I have multiple copies of FC running with several boards attached.

Martin

Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Chris Powell »

Thanks for the response.
First the programme with the potentiometer loaded last night no problems, without any changes?
I have the Arduino IDE loaded and do run this as well as Flowcode.
I have been using the D port mainly, maybe changing to C of B port may solve the problem as I am using the Do and D1 pins of the arduino and this may be causing issues?
I am also using the Chinese clone boards (Geekcreit), but this has also happened on my Arduino made, Arduino Uno board!
I have the ATmega16u2 chip on all my boards which I believe is where the Ch340 chip set is used?

What I will be looking at in future, is to not use the D0 and D1, in fact try to use another port.
Also if this happens again, unhook the USB and rehook it up hoping the coms port has changed and see if this stops the ADR issue?

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by mnf »

- and if you have something connected to RxTx (D0 D1) you'll need to disconnect them first.

Use a software serial or an Arduino Mega (for testing) - if you need to use UART for Bluetooth etc..

Martin

Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Chris Powell »

I am not using the UART or bluetooth, just the PC, but have now tried the following
Ensure D0 and D1 is not connected
used the Arduino IDE to ensure the coms port is talking to the device.
Plugged abd unplagged the coms port to see it is communication.
Some of the above clears the problems where some don't.
My concern is that the students that are having this problem will be sitting an exam in a couple of months time, and if this occurs in exams conditions, it may cause problems?
Next week the classes are going onto remote learning, so will see if it is something to do with the college setup. At this time the fault is affecting about 30% of the students

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by jgu1 »

Hi Chris!

I have sometimes the same problem. Firts time I have made a new project Project or reopen the FC8 and have to program the Arduino I always go in Build > Project option > General option >
click on the programmerport and clik on the port number you see, and then click ok. Then try to program.

Br Jorgen

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by mnf »

Certainly don't want this problem rearing it's ugly head in exam setting...

Other things to check - when programming doesn't work - check the avrdude command in the programming window - is it correct? If it is the correct port (-P comN) and programming isn't working its an avrdude / target / cable / windows problem) If it's a different port to the compiler settings windows - it's a FC problem and the Matrix team co might be able to proffer a fix.

As mentioned the 'auto select' seems a little hit and miss - but changing target to a different port and then back (or if there is only the one com port then changing the target device) has always worked for me... However, it probably shouldn't be necessary to do this 'step'!

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by jgu1 »

Hi Martin!

Well, well, but that is the circumstances.

I apologize if I have guided in the wrong direction I only want to help Chris and share my experience. :D I have mentioned it before in another topic, perhaps already when FC6 or FC7 was released, can´t remember. Now I have gotten used to doing it, no problem for me.

I have 2 PC where it is the same procedure. But ok if it can be fixed :wink:

By the way, is it only me who had this experience?

Br Jorgen

mnf
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by mnf »

Hi Jorgen,

- no don't think you misguided at all.. It does seem a strange 'bug' that has been mentioned before in the forums several times. I don't think the cause (hardware/software/wetware) or a real 'fix' has ever really appeared either.

My personal opinion is FC doesn't update the port correctly after an auto-detect. So a manual set is required - but as with many 'occasional' bugs it's hard to prove..

Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by jgu1 »

Thank´s Martin. Meanwhile, maybe MM will look at this, could be my explanation could hel Chris. :D

Br. Jorgen.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Steve »

jgu1 wrote:
Mon Oct 19, 2020 7:50 pm
Thank´s Martin. Meanwhile, maybe MM will look at this, could be my explanation could hel Chris. :D
So you know, we're not ignoring this thread. We had a conversation internally yesterday and we're actively looking into it.

Chris Powell
Posts: 9
Joined: Wed Jul 15, 2020 6:51 pm
Contact:

Re: unable to upload code onto Arduino Uno R3

Post by Chris Powell »

Thanks Everyone,
I am dealing with Alistair and the Matrix guys directly at this time.
It is Half term now so giving me a little respite to work on other issues.
When we get a solution I will place the fix onto the forum.

agani Thanks

Chris

Post Reply