send gcode command from tinker-board via SPI without DSF
-
Is It possible to send gcode command from a tinker board to a Duet board via SPI without installing the DSF on the Debian OS?
this is the code I am using with Python-periphery library but nothing is happening.
from periphery import SPI
spi = SPI("/dev/spidev1.0", 0, 1000000)
data_out = b'G1 Y180 F5000\n'
data_in = spi.transfer(data_out)
spi.close() -
@shenouda13 In theory, yes, but it would be really really difficult because you'd have to reimplement the whole SPI communication protocol including code flow handling, macros, jobs, etc. What's keeping you from installing DSF and using dsf-python?
-
@chrishamm thank you for your reply. Yes I realized installing DSF is the easiest way.
However I have few questions regarding the connection between the SBC and duet:
are they 5 wire connection in total? is the connection below right?
Also how to identify the GpioChipDevice and TransferReadyPin? I couldn't get any info from gpioinfo and gpioget
-
@shenouda13 You must connect +3.3V as well, else the buffer chips on the Duet aren't enabled. Actually I started working on a guide for the ASUS Tinker Board 2 a while back but I haven't had a chance to finish it yet - from my notes the SPI interface should be /dev/spidev1.0 and the TfrRdy should be gpiochip4 -> 28 (pin 128).
-
@chrishamm I have tried to run the command gpioget gpiochip4 28 and tried also with gpiochip0
and it gave me this error: gpioget: error reading GPIO values: No such file or directoryany suggestion?
-
@chrishamm something was done for tinkerboard 2 ?
-
@tom33 does the tinkerboard have USB host capability? If so then it would probably be easier to connect it to the Duet via USB.
-
@dc42 this is the usb port :
1 x USB 3.2 Gen1 Type-C OTG port
2 x USB 3.2 Gen1 Type-A ports
2 x USB 2.0 Pin headerThe otg can use host capability ?
-
@tom33 yes, USB OTG is a limited form of host capability.
-
@dc42 perfect, I just need to follow the instruction from this page : https://docs.duet3d.com/User_manual/Machine_configuration/DSF_Other
or this is an other procedure ?