Jump to content
  • 0

Pi controlling arduino


mustafasei

Question

18 answers to this question

Recommended Posts

Hi @mustafasei,

Unfortunately, I don't have any further advice for you, since I don't have a Raspberry Pi of my own. I'm not familiar with the visaconf.ini file, so don't have any comments on how that would work. You could try posting on that thread, though since the thread is a couple of years old I don't know the response you would get. I will reach out to another engineer to see if they have any suggestions on this, though they don't spend much time on this anymore so I don't know when they will respond.

Thanks,
JColvin

Link to comment
Share on other sites

Hi @mustafasei,

When you provide the different serial port options, such as the /dev/ttyACM0, as the LINX Resource Input, could you provide a screenshot of this input? My understanding is that the drop-down menu options do not contain the correct path to the serial port (or at least do not show up correctly).

Thanks,
JColvin

Link to comment
Share on other sites

Hi @mustafasei,

I heard back and have a couple of follow-up questions since a couple of things are unclear to me. When you try alternate serial port options (such as the /dev/ttyACM0 that was found in the dmesg | grep tty command you used) in the string input, do you still receive an error from LabVIEW? Can you attach some screenshots of this? Currently, I only see the screenshot for the ASRL4 string input with the 5006 error and that you got this same error for other things, though I do not know what you attempted.

Thank you,
JColvin

Link to comment
Share on other sites

Hi @JColvin

Regarding the drop-down  and string you mentioned above I think you were looking into jpeyron post not mine since I used a string and put in the string with many names for the ports but not succeed.

 I'm using arduino Uno with the RPI3 and the results of the dmesg | grep tty as below:

pi@pi:~ $ dmesg | grep tty
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa02082 bcm2709.serial=0xc2a6a8 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:C2:A6:A8 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfs elevator=deadline rootwait
[    0.001349] console [tty1] enabled
[    0.322505] console [ttyS0] disabled
[    0.322668] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
[    1.051637] console [ttyS0] enabled
[    2.080172] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[   11.785598] systemd[1]: Expecting device dev-ttyS0.device...
[   13.808806] systemd[1]: Starting system-serial\x2dgetty.slice.
[   13.858610] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   15.411382] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device
and the resluts of the instruction in the thread in your post is:

pi@pi:~ $ sudo schroot -r -c lv
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Success
root@pi:.# opkg update
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/all/Packages.gz.

Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-all-0.
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/armv7a-vfp/Packages.gz.
Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/armv7a-vfp/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-armv7a-vfp-0.
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/generic_armv7a/Packages.gz.
Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/generic_armv7a/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-generic_armv7a-0.
root@pi:.# opkg upgrade visa
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Success
root@pi:.# opkg update
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Success
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/all/Packages.gz.
Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-all-0.
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/armv7a-vfp/Packages.gz.
Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/armv7a-vfp/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-armv7a-vfp-0.
Downloading http://feeds.labviewmakerhub.com/armv7a/ipk/generic_armv7a/Packages.gz.
Inflating http://feeds.labviewmakerhub.com/armv7a/ipk/generic_armv7a/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/uri-generic_armv7a-0.
root@pi:.# opkg upgrade visa
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Success
root@pi:.# 

 

 

please advise what is the next step

 

 

Link to comment
Share on other sites

Hello @mustafasei,

It looks like from your screenshot you did not create a string constant but are still using the VISA Resources drop-down since the correct USB device for the Arduino will not appear on the list. I imagine you are using a cdc-acm USB serial device (such as the Arduino Uno or Leonardo) so there was a bug in VISA that got an update though I don't know if it was ever formally rolled out, but this LabVIEW MakerHub thread discusses this. You might also use "dmesg | grep tty" as a way to find out the attached devices rather than listing everything.

Thanks,
JColvinn

Link to comment
Share on other sites

Hi @jpeyron

Yes I folow the instructions on you tube and I can see the port number for arduino in the device manager and I put the same port in .vi when I connect the arduino directlly on PC USB port but.

my problem is when I connect the arduino on raspberry pi3 USB port what will be the port name because in the thread below some says it is (ex /dev/ttyUSB0

andsome says it must be (ASRL2::INSTR )

and other say (/dev/ttyACM0) or (/dev/ttyACM1)

I have used this command (ls /dev/tty*) on RPI and I got ports as picture below but still not work when i put it in the .vi and give me the same error of 5006 in my previous post. 

 235744495_RPICOM.PNG.14ae2a27deb388c2f2f01b646071bd74.PNG

any idea please ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...