Search the Community
Showing results for tags 'spi'.
I bought an orange pi lite 2 and I would like to use it with the ADC MCP3008 but when executing the code in python using the spidev library, it always returns the value of 1023 and when I disconnect the ADC it keeps showing the same value, it is as if there was no communication , The ADC is not the one with the problem since I tried it with an arduino mega and it works perfectly, it is in the orange pi lite 2 where it does not work. the connections are: VDD=3.3V VREF=3.3V AGND=GND CLK= (PC00) SPIO_CLK DOUT=(PC03) MISO DINT=(PC02) MOSI CS = (PC05) SPI0_CS0 DGND= GND import spidev import time spi = spidev.SpiDev() spi.open(0, 0) def read() adc = spi.xfer2([1,8<<4,0]) data = ((adc & 3) << 8) + adc return data while True: print(====================) print(read()) time.sleep(0.5) The only thing that returns is 1023 always if I have the spidev0.0 my armbianEnv.txt verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun50i-h6 rootdev=UUID=07e078d5-15c7-4e03-8ec7-edf62ab350ed rootfstype=ext4 overlays=spi-spidev w1-gpio param_spidev_spi_bus=0 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u check the connection more than once, I don't know if the pins of MOSI, MISO, CLK and CS0; They are well configured with the ADC, I support myself for the connection with the following image. I speak Spanish, so I used google translator, therefore I apologize if I do not explain myself well.
Hello Folks, good day. I have a project where I need to use a OrangePi 4B and couple of hardware pieces connected to it. I'm having trouble putting together a Linux image where I have, at least the minimum functions required for the project working. I need an image where these items below are enable/working: - SPI - I2C - GPIO - PWM - 10.1 MIPI DSI LCD + TOUCH (available here) - MIPI CSI Webcam (OV13850) - 3D Acceleration (WebGL / OpenGl) using the Mali t860 - Bluetooth - Wifi Ideally, I would like to use the most recent Focal mainline kernel, but a legacy image will also be fine. I've been spending a lot of time building and testing many different images, I tested all available on the OrangePi website and the ones pre built on the Armbian too. Some peripheral works on some images, some others not, etc. I also built several images myself but, up to the moment I was not able to make a single one with all the features above working. I'm looking for help from the experts here on suggestions/guidance on how to accomplish the task of having a single, (preferably updated) linux image working on this project. Appreciate the help. Thank you.