Hackpads are smart collaborative documents. .
994 days ago
Unfiled. Edited by 劉政德(zxc2694 994 days ago
劉政德(zxc2694
  1. 当STM32F417第一次检测到VSYNC下降沿时,系统第一次产生中断,表明OV7670开始输出一帧图像,STM32F417将FIFO_WEN置高电平,当HREF有效(高电平)时,FIFO_WEN与HREF通过与非门使能FIFO的WCK,将有效图像数据自动写入FIFO中。
  1. .当第二次VSYNC中断产生时,表明已经将一帧完整的图像写入FIFO,系统通过将FIFO_WEN置低,锁存一帧图像数据,实现图像的静态存储。此时,STM32F417送给FIFO的读时钟RCLK一个上升沿,将数据从FIFO中读出来,完成图像数据的实时采集与提取。
  • 由于对摄像头工作参数的配置主要通过SCCB来实现,因此,在系统进行软件设计时,首先设计SCCB相关程序,进而通过SCCB设置摄像头的相关参数。
 
1356 days ago
Unfiled. Edited by 劉政德(zxc2694 1356 days ago
  • #!/usr/bin/env python
  • import sys, serial
  • import numpy as np
  • from time import sleep
  • from collections import deque
  • from matplotlib import pyplot as plt
  •  
  •  
  • # class that holds analog data for N samples
  • class AnalogData:
  •   # constr
  •   def __init__(self, maxLen):
  •     self.a1 = deque([0.0]*maxLen)
  •     self.a2 = deque([0.0]*maxLen)
  •     self.a3 = deque([0.0]*maxLen)
  •     self.a4 = deque([0.0]*maxLen)
  •     self.maxLen = maxLen
  •  
  •   # ring buffer
  •   def addToBuf(self, buf, val):
  •     if len(buf) < self.maxLen:
  •       buf.append(val)
  •     else:
  •       buf.pop()
  •       buf.appendleft(val)
  •  
  •   # add data
  •   def add(self, data):
  •     assert(len(data) == 4)
  •     self.addToBuf(self.a1, data[0])
  •     self.addToBuf(self.a2, data[1])
  •     self.addToBuf(self.a3, data[2])
  •     self.addToBuf(self.a4, data[3])
  •     
  • # plot class
  • class AnalogPlot:
  •   # constr
  •   def __init__(self, analogData):
  •     # set plot to animated
  •     plt.ion() 
  •     self.a1line, = plt.plot(analogData.a1)
  •     self.a2line, = plt.plot(analogData.a2)
  •     self.a3line, = plt.plot(analogData.a3)
  •     self.a4line, = plt.plot(analogData.a4)
  •     plt.ylim([40, 50])
  •  
  •   # update plot
  •   def update(self, analogData):
  •     self.a1line.set_ydata(analogData.a1)
  •     self.a2line.set_ydata(analogData.a2)
  •     self.a3line.set_ydata(analogData.a3)
  •     self.a4line.set_ydata(analogData.a4)
  •     plt.draw()
  •  
  • # main() function
  • def main():
  •   strPort = '/dev/ttyUSB0'
  •  
  •   # plot parameters
  •   analogData = AnalogData(100)
  •   analogPlot = AnalogPlot(analogData)
  •  
  •   print 'plotting data...'
  •  
  •   # open serial port
  •   ser = serial.Serial(strPort, 9600)
  •   while True:
  •     try:
  •       line = ser.readline()
  •       data = [float(val) for val in line.split(',')]
  •       if(len(data) == 4):
  •         analogData.add(data)
  •         analogPlot.update(analogData)
  •     except KeyboardInterrupt:
  •       print 'exiting'
  •       break
  •   # close serial
  •   ser.flush()
  •   ser.close()
  •  
  • # call main
  • if __name__ == '__main__':
  •  main()
 
1359 days ago
1382 days ago
Unfiled. Edited by 劉政德(zxc2694 1382 days ago
3. 用tig 看是否已跳回去。
 
 
 
劉政德(zxc2694 Q.刪除Github上的commit?
1. git reset --hard 4bc3e5c572d86f1aebd5dce53a4bec2c0c090209
2. git push -f origin master
 
1437 days ago
1439 days ago
Unfiled. Edited by 劉政德(zxc2694 , fboris(Huang, Da-Feng) 1439 days ago
摘要:本專題以STM32F405RG(ARM Cortex M4)為基礎嵌入式系統架構,在Linux環境下開發四軸飛行器,移植FreeRTOS作業系統到飛控板,並經由飛控板進行控制,過程中透過PWM輸入訊號控制四顆無刷直流馬達(BLDC),藉由三軸陀螺儀與三軸加速規計算其姿態角,再經由PID控制器來控制其姿態達成穩定的飛行模式。
 
功能:
· Support commercial R/C remoter(Futaba)
 
Members (33)
文宏 王 傑策 湯 shaochung chen 潭子饒 Tsao, Ricardo 曹嘉誠 IACT Will Fong 李昆憶 禎 李胡 William Chen Ethan Huang Gapry Un anderson yeh kv 紀力榮 威寧 陳 howard chi BauHung Chen 黃國維 Yu-ting Yang Yijun Yuan

Create a New Collection

Cancel

Move XXX to XXX


XXX will be invited to the XXX on XXX.

Cancel

Contact Support



Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!


Log in