Please select To the mobile version | Continue to access the desktop computer version


Hot search: orangepi
View: 4809|Reply: 5

rs232 to ethernet , nmea router orange pi zero

[Copy link]








Rank: 1

Post time 2018-3-4 05:32:48 | Show all posts |Read mode
Edited by afric at 2018-3-4 06:51

buy MAX3232 RS232 Serial Port To TTL and i Connected to uart 2- ttyS2 (pin4-5V,pin6-GND,pin11-UART2 RX,pin13-UART2 TX)

I use Armbian_5.35_Orangepizero_Debian_jessie_default_3.4.113

install  python

  1. sudo apt-get install python-serial python3-serial
Copy the Code
write the script
  1. sudo nano
Copy the Code
  1. #!/usr/bin/env python
  2. import time
  3. import serial

  4. ser = serial.Serial(
  5. port='/dev/ttyS2',
  6. baudrate = 38400,
  7. parity=serial.PARITY_NONE,
  8. stopbits=serial.STOPBITS_ONE,
  9. bytesize=serial.EIGHTBITS,
  10. timeout=1
  11. )
  12. counter=0

  13. while 1:
  14. x=ser.readline()
  15. print x
Copy the Code

and i run
  1. sudo python
Copy the Code
to see if ti works
after that i write onether script (i find it ready)
  1. sudo nano
Copy the Code
  1. # Python script for serial to UDP communication
  2. # Alex Olwal, 2012 03 24
  3. #
  4. #

  5. import serial
  6. import sys

  7. from socket import *

  8. def send(msg, ip, port):
  9.     socket(AF_INET,SOCK_DGRAM).sendto(msg, (ip, port))

  10. baud_rate = 38400

  11. if ( len(sys.argv) == 1 ):
  12.         print "Serial-to-UDP utility | Alex Olwal, 2012,"
  13.         print "Syntax: " + sys.argv[0] + " serial_port udp_ip(= udp_port(= 5000)"
  14.         print "Example: " + sys.argv[0] + " COM20 5000"
  15.         quit()

  16. serial_port = sys.argv[1]

  17. if ( len(sys.argv) >= 3 ):
  18.         udp_ip = sys.argv[2]
  19. else:
  20.         udp_ip = ""

  21. if ( len(sys.argv) >= 4 ):
  22.         udp_port = sys.argv[3]
  23. else:
  24.         udp_port = "5000"
  26. if ( len(sys.argv) >= 5):
  27.         printing = 1
  28. else:
  29.                 printing = 0

  30. print "Reading from serial port: " + serial_port
  31. print "Sending to " + udp_ip + ":" + udp_port

  32. udp_port = int(udp_port)

  33. s = serial.Serial( serial_port, baud_rate, timeout=1 )

  34. while (1):
  35.         line = s.readline()

  36.         if (line != ''):
  37.                         if (printing):
  38.                                 print line[:-1]
  40.                         send( line, udp_ip, udp_port )

  41.         else:
  42.             if (printing):
  43.                 print "."

  44. s.close()
Copy the Code
now if you run
  1. sudo python
Copy the Code
you will take
  1. Serial-to-UDP utility | Alex Olwal, 2012,
  2. Syntax: serial_port udp_ip(= udp_port(= 5000)
  3. Example: COM20 5000
Copy the Code
so  run
  1. python  /dev/ttyS2 13000 &
Copy the Code
and take serial data from ttyS2 and  sent it to pc at port 13000

there are 2 ways to auto start on boot
the fisrt is direct config rc.local but put inside 1minute wait to find the ethernet
  1. sudo nano /etc/rc.local
Copy the Code
  1. sleep 1m
  2. python /root/  /dev/ttyS2 13000 &
Copy the Code
before exit0

and the other to create a script
  1. sudo nano /etc/init.d/
Copy the Code
  1. #!/bin/sh
  2. python  /root/  /dev/ttyS2 13000 &
Copy the Code
i make it  executable with
  1. sudo chmod +x /etc/init.d/
Copy the Code
and after that run
  1. sudo update-rc.d defaults
Copy the Code
and after that modified the  rc.local
  1. sudo nano /etc/rc.local
Copy the Code
  1. /etc/init.d/
  2. sh '/etc/init.d/'
Copy the Code
before exit0

  1. sudo reboot
Copy the Code
and it worksssssssssss







Gold member

Rank: 6Rank: 6

Post time 2018-3-5 16:48:36 | Show all posts
nice that serial socket for Linux will be good with my facial recognition app that allows hardware access so you can make a robot follow movements like if you want a robot head to stare at you, I only had the windows usb pipe before. I will use that with an swf. You have a tcp version?
Post time 2021-11-4 04:49:46 | Show all posts

High Rated Business Cards Info

In reply to the people asking about cut vinyl lettering install, vancouver film signs, signs vancouver wa, window decals uk,  I highly recommend this top rated brochures details and don't forget banners of ruin, bc transit bus shelters, wall graphics painting, sandwich boards,  look at this new retail printing tips alongside all plaques for graves, sandwich boards, sandwich boards near me, promotional materials uk,  try this top rated construction signage blog for print media css, construction jobs stockport, transit shelters for buses, plaques and tangles play,  Also don't forget this new cad info not to mention bc transit bus shelters, floor graphics for concrete, decals for walls, graphic design jobs stockport,  look at this awesome advertisements site for stickers, decals, brochures crossword clue,  alongside all this great british columbia printing info and don't forget floor graphics communicate, window decals simplisafe, promotional materials examples, banners tour,  look at this recommended cut vinyl lettering advice not to mention printing retail outlets, graphic design, architecture degree, transit shelter ad,  try this new floor graphics blog for stickers and that, advertisements pronunciation, sandwich boards signs, promotional materials halimbawa,  Also don't forget this new british columbia printing advice as well as decals for motorhomes, window decals for cars, printing restaurant menus, wall graphics for bedroom,  look at this awesome cad site for decals, window decals, advertisements meaning, See More Where To Compress Video Url 5886ea4
Post time 2021-11-11 05:09:09 | Show all posts

Cool Business Massage Site

사람들 에 대한 질문 ÿþ Ñä²tÇ  나는 이것을 매우 제안합니다 유용한 종로출장안마 블로그 언급할 것도 없이 ÿþ Ñä²tÇ  이것 좀봐 멋진 부천출장안마 조언 그리고 잊지 마세요 ÿþ Ñä²tÇ  이것 좀봐 최고 위례출장안마 세부정보 for ÿþ Ñä²tÇ  또한 이것을 잊지 마십시오. 추천 송파출장안마 조언 뿐만 아니라 ÿþ Ñä²tÇ  이것 좀봐 추천 서대문출장안마 조언 for ÿþ Ñä²tÇ  언급할 것도 없이 this 최상급 영등포출장안마 조언 위에서 ÿþ Ñä²tÇ  이것 좀봐 멋진 출장마사지 정보 on top of ÿþ Ñä²tÇ  try this 신규 인천출장안마 팁 for ÿþ Ñä²tÇ  Also don't forget this 높은 평가 고양출장안마 사이트 그리고 잊지 마세요 ÿþ Ñä²tÇ  이것 좀봐 멋진 출장 조언 for ÿþ Ñä²tÇ See More Useful Massage Analysis 545_22b
Post time 2021-11-30 16:15:19 | Show all posts

Top Internal Transport Robot Site

What are the major advantages of Autonomous Mobile Robot?

1. More flexibility
Autonomous Mobile Robots are able to adapt and fluid automation because of their dependence on cameras and onboard sensors. Autonomous Mobile Robots are not required to follow predefined routes. Instead, they can dynamically design their own routes from Point A through Point B within the facility. This allows them to stay clear of obstructions. Autonomous Mobile Robots have the ability to shift to new tasks faster than other automation techniques. Check out this Internal transport robot info for more.

2. Safety - Increased
Autonomous Mobile Robots are full of sensors and cameras. These cameras let Autonomous Mobile Robots to comprehend and perceive their surroundings. Autonomous Mobile Robots can then move efficiently within a building without crashing into objects, people or the infrastructure. Equipment operated by humans like forklifts doesn't have the same safety mechanisms and relies on the input of humans. Autonomous Mobile Robots remove the possibility that human operators are exhausted or distracted. But, this is not a concern with Autonomous Mobile Robots. Utilizing Autonomous Mobile Robots for tasks that are easily repeatable, therefore, allows operations to remove the potential for human error and greatly improve the overall security of the facility.

3. Rapid Implementation
Autonomous Mobile Robots are able to be operational during an operation within between four and six weeks dependent on the particulars of the project. The picking software and warehouse execution programs that they will have to integrate with are crucial. On the upper portion of the spectrum this is an incredibly small amount of time--especially when compared with other technologies. As a point of an example, a goods to person (G2P) system could take up to a full year to fully implement.

4. Ability to Scale
Autonomous Mobile Robots are extremely simple to work with in a factory. It is possible to follow modular deployment methods, which allows users to start with only a few units then increase the capacity of your operation as it grows or as your needs alter. You can start with a small amount and expand your fleet as you go. This saves you a lot of cash upfront. This modular deployment lets you free up capital that you can use to fund other projects as you study the effects of Autonomous Mobile Robots on your business and plan your next steps.

5. Facilities are easy to move between
Some operations might be hesitant to explore automated options because they are aware that the move to a new facility will soon be a possibility. This is understandable. A new system may not be required for two years, so why would you need to implement it? Autonomous Mobile Robots are able to help fill in the gap in these instances. Since Autonomous Mobile Robots are easy to set up and deploy, they can be moved between facilities in a relatively simple manner, allowing automation even in the short term. This is a benefit to businesses seeking to set up temporary holiday operations.
Post time The day before yesterday 07:19 | Show all posts

Great Business Trip Massage Forum

A massage for business trips is a massage that can help to relax while on vacation. The type of massage is commonly described as a "business massage. It's a great option to recharge your body and mind following stress from physical or mental, or fatigue. A massage can help you get better sleep at nights. These are the benefits of a Business Travel Massage. Take advantage of this treatment during your trip! A business trip massage will help you relax and restore focus while on a business trip. It will aid in preventing chronic back pains and can alleviate any tension. This service is available at many massage parlors, so be sure to inquire! A chair massage of 15-20 minutes can be a wonderful opportunity to relax after a long journey. A complete body massage is the perfect present for business travelers. The Business Travel Massage is a great gift for your employees and you. No matter whether you are a frequent or casual traveler, getting a massage is a great way to stay focused while on long flights. It can also help prevent the pain in your back becoming chronic and make your journey more pleasurable. Swedish massages and deep tissue massages are two of the most requested massages for travellers. Aromatherapy massages are also extremely popular. A chair massage can be an ideal alternative for those who are budget conscious. Check out this  출장안마 for info.

Benefits Of Business Trip Massage
Business travelers can avail of massages during an official trip. Massages can improve your mental clarity as well as accelerate recovery after long flights. Massages can help ease chronic back pain. Some of the most preferred kinds of massages for business travelers include deep-tissue massages, Swedish massages, and aromatherapy. A 15- to 20-minute chair massage can be a great option if you are in need of a quick solution.  Business Travelers should have massages when on vacation. Getting a massage while on an excursion is a fantastic option to remain focused and to avoid back pain that is chronic. A massage on an official trip could be as simple as the simple act of a Swedish massage or a chair massage. A massage during a business trip can make all the difference between a stressful and peaceful experience. Massages that are effective can boost productivity and ease stress.  Massages can help business travelers remain relaxed and focused during the course of their trip. A massage can help prevent back pain. Massages can aid in recovering from long flight. The massage will help to relieve back discomfort. There are a variety of massages available for travelers. There are many massage options available for those who travel, such as Swedish and deep tissue massages, along with aromatherapy and aromatherapy massages. A chair massage can be performed anywhere, so it's a quick and simple fix. If you are on a business trip and want to relax, a massage in a chair is also possible.
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2022-1-27 16:46 GMT+8 , Processed in 0.034703 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list