nopnop2002

Members
  • Content Count

    68
  • Joined

  • Last visited

About nopnop2002

  • Rank
    Advanced Member

Recent Profile Visitors

853 profile views
  1. nopnop2002

    Debian stretch pwm overlay driver[SOLVED]

    I was wrong. I used USB-TTL converter with a debugg port. When I remove USB-TTL converter,my SG90 work perfect. #!/bin/bash #Export PWM channel for user control. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/export" #Select the period of PWM signal. Value is in nanoseconds. sudo sh -c "echo 20000000 > /sys/class/pwm/pwmchip0/pwm0/period" #Change the polarity of the PWM signal. #The polarity can only be changed if the PWM is not enabled. sudo sh -c "echo "normal" > /sys/class/pwm/pwmchip0/pwm0/polarity" #Enable the PWM signal. sudo sh -c "echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable" #Select the duty cycle. Value is in nanoseconds and must be less than the period. #Move to Center sudo sh -c "echo 1450000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Angle +90 sudo sh -c "echo 2350000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Angle -90 sudo sh -c "echo 600000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Center sudo sh -c "echo 1450000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Disable the PWM signal. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable" #UnExport PWM channel for user control. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/unexport"
  2. Hello. I added overlays=pwm to /boot/armbianEnv.txt and reboot system. $ cat /boot/armbianEnv.txt verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 rootdev=UUID=3d863bb3-b616-4229-94e7-8c92ac95501a rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u overlays=pwm Armbian can't boot-up. ** Unable to read "/boot/boot.env" from mmc0:1 ** Failed (-5) In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 230454 bytes read in 23 ms (9.6 MiB/s) starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 USB4: USB EHCI 1.00 USB5: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 2 for devices... 1 USB Device(s) found scanning bus 4 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3708 bytes read in 18 ms (201.2 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 214 bytes read in 15 ms (13.7 KiB/s) 5104363 bytes read in 264 ms (18.4 MiB/s) 6985408 bytes read in 359 ms (18.6 MiB/s) Found mainline kernel configuration 32108 bytes read in 60 ms (522.5 KiB/s) 884 bytes read in 130 ms (5.9 KiB/s) Applying kernel provided DT overlay sun8i-h3-pwm.dtbo 4179 bytes read in 127 ms (31.3 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 44000000 Warning: Disabling ttyS0 console due to enabled PWM overlay ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5104299 Bytes = 4.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Loading Ramdisk to 49b21000, end 49fff2ab ... OK reserving fdt memory region: addr=43000000 size=6e000 Loading Device Tree to 49ab0000, end 49b20fff ... OK Starting kernel ... System information $ cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepipc BOARD_NAME="Orange Pi PC" BOARDFAMILY=sun8i VERSION=5.65 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage Can't I use sun8i-h3-pwm.dtbo?
  3. nopnop2002

    Realtek RTL8192EU WiFi driver?

    I'm trying to compile 8192EU chip driver. But I can't find linux-headers-4.14.78-sunxi orangepi@orangepipc:~$ uname -r 4.14.78-sunxi orangepi@orangepipc:~$ ls /usr/src linux-headers-4.14.70-sunxi orangepi@orangepipc:~$ uname -a Linux orangepipc 4.14.78-sunxi #412 SMP Fri Oct 26 11:37:04 CEST 2018 armv7l GNU/Linux
  4. nopnop2002

    Which WiringPi for NanoPi NEO

    Without using WiringPi, address operation of gpio is being performed directly, so NeoUart doesn't work with Opi. I have not tried, but you can probably use this. https://github.com/vanvught/rpidmx512/tree/master/lib-ws28xx
  5. nopnop2002

    Which WiringPi for NanoPi NEO

    Try this https://github.com/wertyzp/WiringNP It's my environment $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" $ cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=nanopineo BOARD_NAME="NanoPi Neo" BOARDFAMILY=sun8i VERSION=5.60 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage
  6. try sudo h3disp -m 5 -d and reboot If you get a clear display, you can set the display area to 800x480 later by modifying the script.bin file. [disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 screen0_output_mode = 5 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 800 fb0_height = 480 fb1_format = 0 fb1_width = 0 fb1_height = 0 hdcp_enable = 1
  7. nopnop2002

    Orange pi zero ir receiver and transmitter

    A method the infrared reception and the infrared transmission for which lirc isn't used by this page is introduced. http://feijoa.jp/laboratory/raspberrypi/infrared/ So I tried whether it work using OrangePi-PC. It work fine. $ cc scanir.c -o scanir -lwiringPi -lpthread $ sudo ./scanir tv_on.ir write file: tv_on.ir scaning pin: 7 (wiringpi) max keep time: 40(ms) Infrared LED scanning start. Pressed Ctrl+C, this program will exit. Scanning has been done. $ ls -l tv_on.ir -rw-r--r-- 1 root root 476 Jun 26 07:56 tv_on.ir $ cc sendir.c -lm -o sendir -lwiringPi -lpthread $ sudo ./sendir tv_on.ir 1 14 read file: tv_on.ir output pin: 14 (wiringpi) unit: 26ms duty:9-17 send infrared signal. send data. done scanir The first argument is file name of output. The second argument is The pin number of Infra red sensor.(The pin number of WiringPi, Default is 7.) The third argument are the biggest duration. When infrared rays didn't light up more than this time, the biggest duration considers a transmission from a remote control to end, ends the reading and extracts a file. sendir The first argument is file name of read. The second argument is repeat counter. The third argument are The pin number of Infra red transmitter.(The pin number of WiringPi) The fourth argument are Frequency of transmit signal. The fifth argument are Molecule compared with duty The sixth argument are denominator compared with duty.
  8. nopnop2002

    Orange pi zero ir receiver and transmitter

    I think: On board MCU(STC11F02E) launches a start bit unconditionally. Start Bit of this module is NEC format(13.5ms) fixing. It isn't possible to change Start Bit of SAMSUNG format(9ms) via UART. If you can change firmware of On board MCU(STC11F02E), It's possible to send SAMSUNG format.
  9. nopnop2002

    Orange pi zero ir receiver and transmitter

    There is Chinese Manual. http://www.uctronics.com/download/U3107_Infrared_decoding_module.zip#sthash.Br6igdz4.dpuf There is following explanation. Signal launch of 940nm38kNEC code.
  10. nopnop2002

    Orange Pi Zero Second SD Card using a GPIO for CS?

    I ported from here. http://blogsmayan.blogspot.jp/p/interfacing-sd-card.html https://github.com/nopnop2002/SD_CARD_via_GPIO orangepi@orangepipc:~/sdcard$ sudo ./RpiSDCard_gpio Open an existing file (HELLO.TXT). f_open rc=0 Type the file content. Hello world! Goodbye world. 121 253 199 Close the file. Create a new file (HELLO.TXT). Write a text data. (Hello world!) 14 bytes written. 16 bytes written. 1 bytes written. 1 bytes written. 1 bytes written. 2 bytes written. 1 bytes written. 1 bytes written. 1 bytes written. 2 bytes written. 1 bytes written. 1 bytes written. 1 bytes written. 2 bytes written. Close the file. Open root directory. Directory listing... <dir> SYSTEM~1 88 TEST.TXT 45 HELLO.TXT Test completed.
  11. nopnop2002

    IR Receiver for NanoPi Neo

    Pin assignment of this module is probably below. The left :Signal ->IR receiver pin.pin #6 on the 12 pin header Medium :Gnd The right :3.3v An IR receiver power supply has to be 3.3V. Don't use 5V. Check this. https://www.marinostore.com/sensores/87-receptor-infravermelho-tl1838-vs1838-vs1838b.html Installation is same as OPI-PC.
  12. nopnop2002

    Nanopi Neo Air and WiringNP

    There is 2 Repository. https://github.com/friendlyarm/WiringNP https://github.com/wertyzp/WiringNP friendlyarm's WiringNP have a mapping bug. gpio of pin#35 and #36 won't work. static int pinToGpio_m1 [64] ={ 0, 6, // 0, 1 2, 3, // 2, 3 200, 201, // 4 5 1, 203, // 6, 7 12, 11, // 8, 9 67, 17, //10,11 64, 65, //12,13 66, 198, //14,15 199, -1, //16,17 -1, -1, //18,19 -1, 20, //20,21 21, 8, //22,23 // 13, 9, //24,25 /nopnop2002 16, 9, //24,25 // 7, 16, //26,27 /nopnop2002 7, 13, //26,27 15, 14, //28,29 19, 18, //30,31
  13. nopnop2002

    OPI PC with lirc ( IR transmit )

    @yigido I'm sorry by the slow response.
  14. nopnop2002

    eMMC backup

    I fixed my post.
  15. nopnop2002

    I finally mapped the GPIO on the OPZ+2 (H3)

    @specialist383 For Python users,you can control all pin using python-periphery. https://github.com/vsergeev/python-periphery.git