Arduino Programming In Flowcode v6

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

Moderator: Benj

User avatar
stregato
Posts: 18
Joined: Tue Feb 25, 2014 12:28 am
Been thanked: 3 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by stregato »

Hello Benj

Honestly I noticed this consideration by reading the manual of avrdude , but it was the only way of experiencing different arduino with a positive result , normally look to the result if it works for me is ok :P

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by RobH »

I'm beginning to think that the Sparkfun ProMicro is just NOT going to work in FC via USB. One or both of the reasons I suspect are on-board (non-standard I assume) bootloader or the hit and miss timing after pressing reset. I found this explanation (https://forum.sparkfun.com/viewtopic.ph ... 55#p147626) about how the bootloader kicks in after hitting reset...

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by JohnCrow »

Hi Ben
The file for the UNO R3 works fine now thanks.

But I've just got a Arduino xino from Ciseco to try the new SRF Wireless Things component. It has the same problem, it wont program with the Xino component, but will with the normal UnoR3. Is there any difference in they way they are programmed if using the SRF module though.
Thanks
1 in 10 people understand binary, the other one doesn't !

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by nuwan5213 »

:(

please advice .i cannot program arduino uno r3.
here are the massages and what have i done.

it says,
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrc_arduinoA.bat m328 arduino com2 115200 "Flowcode1.hex"
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e950f
avrdude.exe: Expected signature for ATmega328 is 1E 95 14
Double check chip, or use -F to override this check.
avrdude.exe done. Thank you.
Error returned from [avrdude]
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrc_arduinoA.bat reported error code 1
FINISHED

regards,
nuwan
Attachments
13.JPG
(125.03 KiB) Downloaded 7301 times
12.JPG
12.JPG (80.53 KiB) Viewed 33577 times
11.JPG
11.JPG (59.33 KiB) Viewed 33577 times
Electronics for better world.

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: Arduino Programming In Flowcode v6

Post by Benj »

Hello Nuwan,

Have you copied these definition files into your installation?

http://www.matrixtsl.com/mmforums/viewt ... =75#p66281

Pactor
Posts: 61
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 20 times
Been thanked: 14 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by Pactor »

Hello

I thought I'd have a go at the Arduino, I'm using version 6 latest update and it works fine on the desk top the file transfers to the Arduino in a flash.
But try it on the laptop with the same setup and all you get is USB port access denied messages. But the actual Arduino software itself downloads without problem, (when used on the laptop), so it seems very odd. Also I had the feeling they were both calling on AVRdude to do the actual download, so if it works when used via Arduino why not via flowcode.

I was going to try some different settings but in compiler options even if you make up another settings name, the items are still greyed out.
Can you change any of the programmer options now I wonder.
It seems to lock up the laptop as well after the access denied message appears, everything starts running very slowly until you reboot, every a soft reboot wont work you have to force it to shutdown.

Thanks for any info

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: Arduino Programming In Flowcode v6

Post by Benj »

Hello,

Have you checked to see if the COM port shown in the project options is correct for your device on the Laptop.

It could be that after the access denied message AVRdude is still running. If you press Control + Shift + Escape then this will bring up the Windows task manager. Go to the Processes tab and check if AVRdude is running. If it is then you can kill it without having to reboot windows. Right click AVRdude and select End Process.

The Arduino settings are now hard coded in the definition files (FCDX), you could try copying the working files from your desktop to your laptop to see if this helps at all?

Out of interest which Arduino hardware are you using?

Pactor
Posts: 61
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 20 times
Been thanked: 14 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by Pactor »

Thanks very much for the reply,
I was using the UNO I think a genuine one.
Yes the com port was correct, I checked and AVRdude was not still running but something was making the laptop run very slowly after the access denied message, I could not even reboot it just had to do a hard shutdown. The files were exactly the same on the Desk top as the laptop.
I got over it by using the usbtiny to do the download. I altered on of the FCDX files, I cant pretend I knew what I was doing but it worked.
I was attach it if possible.
Arduino Uno R3 PDIP m328p usbtiny.fcdx
I used this for usbtiny
(12.33 KiB) Downloaded 720 times
All the best

Mark

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Arduino DUE Programming In Flowcode v6

Post by Rudi »

Benj wrote:
..The Arduino Due board and Atmel SAM3X range is not currently supported at all in Flowcode, maybe it is something we can add further down the road...
hi benj

almost 2 years later .. :mrgreen:
planned or already implemented to support arduino due in fc6?

I ask because I am working at 32bit Atmels ARM user_chip_pack (Atmel acquired by MC), and 32bit MCP currently
same time to the 32bit series of integral espressif.

Arduino Due, Here then result also extended 'USB Host' options and more.
whats the planning in this for FC6, and whould FC7 support 32bit ARM?

best wishes
rudi;-)

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: Arduino Programming In Flowcode v6

Post by Benj »

Hi Rudi,

We are currently looking at adding the PIC32 and ST ARM range of devices for Flowcode v7. No current plans for any additional Atmel ARM based devices.

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Arduino Programming Atmega 2560 R3

Post by Rudi »

hi

have an 2560 R3 as I2S CAL Master in HW Mode with channel mode by 100Khz.

i tested by change to customer frequenz samples in 50000 ( 50kHz ) , 10000 ( 10kHz ) and other

i tested low frequenz example 1000 ( 1kHz ) , but i get 125 kHz by SCL time 3.958 µs
at 500 Hz get SCL 250 kHz :mrgreen:
HW_Custom_1000.png
my question:
can we use the HW for low frequenz?

btw
in sw mode, the SCL goes to the right 0.243 ms

best wishes
rudi ;-)

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: Arduino Programming In Flowcode v6

Post by LeighM »

Hi Rudi,

We currently only use the TWBR bit rate generator, which is an 8 bit register (and we set the prescaler to 1:1) hence this does not give bit rates less than about 30KHz.
We could also use the TWPS prescaler to divide down to about 500Hz, but not sure about the demand for that.

I could look at modifying the CAL code, if that would be of help?
If so, could you move/copy your request to new thread? That would then help with others searching.

Thanks,
Leigh

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: Arduino Programming In Flowcode v6

Post by LeighM »

Hi Rudi,

Please try the attached updated AVR CAL file

Regards,
Leigh
Attachments
AVR_CAL_I2C.c
(25.44 KiB) Downloaded 597 times

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Arduino Programming In Flowcode v6

Post by Rudi »

LeighM wrote:Hi Rudi,

Please try the attached updated AVR CAL file

Regards,
Leigh

Hi Leigh

txs, runs like a clock work.

Leigh, one more question ( not hurry )
the I2C_Cal_Slave component, this does only support the HW Mode? ( 2560 R3 )
if i change in same project ( basis matrixTSL demo project ) to software mode, same pins, same baud, there is still moment no function possible.

the i2c_cal_master component, this does run in HW mode and in Software ( without changing pins, and baud ) mode well.

thank you!
best wishes!
rudi ;-)

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: Arduino Programming In Flowcode v6

Post by LeighM »

Hi Rudi,
Thanks for letting me know it works for you.
Yes, Slave is hardware only.
Regards,
Leigh

User avatar
mikn
Posts: 209
Joined: Mon Mar 03, 2014 10:11 pm
Has thanked: 54 times
Been thanked: 41 times
Contact:

Re: Arduino Programming In Flowcode v6

Post by mikn »

Please help me to connect two arduino pro mini 5v via infrared link.

One board (RX) is loaded with arduino code:

Code: Select all

#include "IRremote.h"
IRrecv irrecv(11); // 
decode_results results;
 
void setup()
{
  Serial.begin(9600); //
  irrecv.enableIRIn(); // 
}
 
void loop() {
  if (irrecv.decode(&results)) // 
  {
    Serial.println(results.value, HEX); // 
    irrecv.resume(); // 
  }
}
another board (TX) is loaded with FC code:
tx.GIF
tx.GIF (23.44 KiB) Viewed 30885 times
RX does not recognize the TX signals. however when I load TX with arduino code

Code: Select all

#include <IRremote.h>   

IRsend irsend;   
 int i=0;

void setup()    
{   
}   

void loop()    
{  
i++;
irsend.sendNEC(i, 32);    
delay(50);    
}  
everthing works ok.
which settings are incorrect in FC?
FC 6.1.3.2 (18.02.2016)

User avatar
jawier
Posts: 14
Joined: Thu Jul 16, 2009 7:45 am
Contact:

Re: No hurry RS232 115200 compatible Mega 2560 R3 char illegible

Post by jawier »

Rudi wrote:
Sun Feb 01, 2015 10:53 am
MEGA 2560 R3 ATMEGA Board compatibel Arduino MEGA2560 R3
USB CI: CH340G from WCH
http://www.ebay.de/itm/171641663903

Hi guys
RS232 works well until 57600.
If set 115200 the character will be illegible.
best wishes
rudi ;-)

older infos:
https://forums.ni.com/t5/LabVIEW/Arduin ... -p/1963481
This is strange because bootloader works pretty good at this baud rate. Also any program compiled in arduino IDE works perfect at 115200.
:?: :?: :?:

Post Reply