Navigation

    • Login
    • Search
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. Home
    2. nqow_1586691935
    N
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    nqow_1586691935

    @nqow_1586691935

    0
    Reputation
    12
    Posts
    1332
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    nqow_1586691935 Follow

    Posts made by nqow_1586691935

    • WiFi模块可以传送文件吗?比如sd卡内的TXT文件

      WiFi模块可以传送文件吗?比如sd卡内的TXT文件

      posted in OpenMV Cam
      N
      nqow_1586691935
    • 我用WiFi的历程发送mjpeg视频流到pc端的charm浏览器上,fps始终只有2左右

      0_1587287202185_无标题.png 请在这里粘贴代码

      # MJPEG Streaming
      #
      # This example shows off how to do MJPEG streaming to a FIREFOX webrowser
      # Chrome, Firefox and MJpegViewer App on Android have been tested.
      # Connect to the IP address/port printed out from ifconfig to view the stream.
      
      import sensor, image, time, network, usocket, sys
      
      SSID =''     # Network SSID
      KEY  =''     # Network key
      HOST =''     # Use first available interface
      PORT = 8080  # Arbitrary non-privileged port
      
      # Reset sensor
      sensor.reset()
      
      # Set sensor settings
      sensor.set_contrast(1)
      sensor.set_brightness(1)
      sensor.set_saturation(1)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_pixformat(sensor.GRAYSCALE)
      
      # Init wlan module and connect to network
      print("Trying to connect... (may take a while)...")
      wlan = network.WINC()
      wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)
      
      # We should have a valid IP now via DHCP
      print(wlan.ifconfig())
      
      # Create server socket
      s = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
      
      # Bind and listen
      s.bind([HOST, PORT])
      s.listen(5)
      
      # Set server socket to blocking
      s.setblocking(True)
      
      def start_streaming(s):
          print ('Waiting for connections..')
          client, addr = s.accept()
          # set client socket timeout to 2s
          client.settimeout(2.0)
          print ('Connected to ' + addr[0] + ':' + str(addr[1]))
      
          # Read request from client
          data = client.recv(1024)
          # Should parse client request here
      
          # Send multipart header
          client.send("HTTP/1.1 200 OK\r\n" \
                      "Server: OpenMV\r\n" \
                      "Content-Type: multipart/x-mixed-replace;boundary=openmv\r\n" \
                      "Cache-Control: no-cache\r\n" \
                      "Pragma: no-cache\r\n\r\n")
      
          # FPS clock
          clock = time.clock()
      
          # Start streaming images
          # NOTE: Disable IDE preview to increase streaming FPS.
          while (True):
              clock.tick() # Track elapsed milliseconds between snapshots().
              frame = sensor.snapshot()
              cframe = frame.compressed(quality=35)
              header = "\r\n--openmv\r\n" \
                       "Content-Type: image/jpeg\r\n"\
                       "Content-Length:"+str(cframe.size())+"\r\n\r\n"
              client.send(header)
              client.send(cframe)
              print(clock.fps())
      
      while (True):
          try:
              start_streaming(s)
          except OSError as e:
              print("socket error: ", e)
              #sys.print_exception(e)
      
      posted in OpenMV Cam
      N
      nqow_1586691935
    • wifi扩展板能否设定其他模式?除了ap热点模式。其他模式又如何使用?

      wifi扩展板能否设定其他模式?除了ap热点模式。其他模式又如何使用?

      posted in OpenMV Cam
      N
      nqow_1586691935
    • 我在使用WiFi图传的时候,没过几秒钟图像都会闪烁卡顿几次。而且FPS并不够高,最多只有20几
      # MJPEG Streaming AP.
      #
      # This example shows off how to do MJPEG streaming in AccessPoint mode.
      # Chrome, Firefox and MJpegViewer App on Android have been tested.
      # Connect to OPENMV_AP and use this URL: http://192.168.1.1:8080 to view the stream.
      
      import sensor, image, time, network, usocket, sys
      
      SSID ='OPENMV_AP'    # Network SSID
      KEY  ='1234567890'    # Network key (must be 10 chars)
      HOST = ''           # Use first available interface
      PORT = 8080         # Arbitrary non-privileged port
      
      # Reset sensor
      sensor.reset()
      # Set sensor settings
      sensor.set_contrast(1)
      sensor.set_brightness(1)
      sensor.set_saturation(1)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_pixformat(sensor.RGB565)
      
      # Init wlan module in AP mode.
      wlan = network.WINC(mode=network.WINC.MODE_AP)
      wlan.start_ap(SSID, key=KEY, security=wlan.WEP, channel=2)
      
      # You can block waiting for client to connect
      #print(wlan.wait_for_sta(10000))
      
      def start_streaming(s):
          print ('Waiting for connections..')
          client, addr = s.accept()
          # set client socket timeout to 2s
          client.settimeout(2.0)
          print ('Connected to ' + addr[0] + ':' + str(addr[1]))
      
          # Read request from client
          data = client.recv(1024)
          # Should parse client request here
      
          # Send multipart header
          client.send("HTTP/1.1 200 OK\r\n" \
                      "Server: OpenMV\r\n" \
                      "Content-Type: multipart/x-mixed-replace;boundary=openmv\r\n" \
                      "Cache-Control: no-cache\r\n" \
                      "Pragma: no-cache\r\n\r\n")
      
          # FPS clock
          clock = time.clock()
      
          # Start streaming images
          # NOTE: Disable IDE preview to increase streaming FPS.
          while (True):
              clock.tick() # Track elapsed milliseconds between snapshots().
              frame = sensor.snapshot()
              cframe = frame.compressed(quality=35)
              header = "\r\n--openmv\r\n" \
                       "Content-Type: image/jpeg\r\n"\
                       "Content-Length:"+str(cframe.size())+"\r\n\r\n"
              client.send(header)
              client.send(cframe)
              print(clock.fps())
      
      while (True):
          # Create server socket
          s = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
          try:
              # Bind and listen
              s.bind([HOST, PORT])
              s.listen(5)
      
              # Set server socket timeout
              # NOTE: Due to a WINC FW bug, the server socket must be closed and reopened if
              # the client disconnects. Use a timeout here to close and re-create the socket.
              s.settimeout(3)
              start_streaming(s)
          except OSError as e:
              s.close()
              print("socket error: ", e)
              #sys.print_exception(e)
      
      
      posted in OpenMV Cam
      N
      nqow_1586691935
    • 在使用WiFi图传的时候,能不能不检测是否有接受,而直接默认发送图像?

      在使用WiFi模块传输图片的时候,发现只要网络一断开,它就无法接着传输,必须再次刷新网页。
      能否不刷新网页它就能接着传输图像呢?
      就相当于WiFi传输图像的时候不检测是否有接收端,默认一直处于发送状态。而只要网络一链接就能接收到图像。(就是想不刷新网页的情况下,图片与数据间隔传输)

      posted in OpenMV Cam
      N
      nqow_1586691935
    • 利用WiFi模块向pc传输视频流的同时,再传输一组数据,应该怎么做?
       img = sensor.snapshot() # Take a picture and return the image.
              frame = img
              cframe = frame.compressed(quality=35)
              header = "\r\n--openmv\r\n" \
                       "Content-Type: image/jpeg\r\n"\
                       "Content-Length:"+str(cframe.size())+"\r\n\r\n"
      
              client.send(header)
              client.send(cframe)
      
      posted in OpenMV Cam
      N
      nqow_1586691935
    • 驱动不小心被我卸载了,现在连接openmv也识别不到了,该怎么办、?

      0_1587009879238_无标题.png上面已经是插入openmv了,但是端口连感叹号都没有了0_1587011203633_无标题.png

      posted in OpenMV Cam
      N
      nqow_1586691935
    • RE: 按照视频教程使用WINC 1500 WiFi扩展板,插入OpenMV,运行热点搜索和无线图传的代码时,报错。

      @yuan 固件比U盘内存还大,怎么存进去?

      posted in OpenMV Cam
      N
      nqow_1586691935
    • RE: 实例WIFI-scan的时候出现了WINC模块不能用的情况![

      @6iyh 对啊,应该怎么办?

      posted in OpenMV Cam
      N
      nqow_1586691935