embeded/arduino(genuino)2016. 4. 6. 20:01

라즈베리는 3.3v 일테고

아두이노는 5v 일텐데.. 그냥 연결해도 되려나?

라즈베리 날려먹긴 싫은데.. 레벨 시프터 사야하나 ㅠㅠ


[링크 : https://www.eleparts.co.kr/EPX8MXNR] 6천원... ㅠㅠ


일단은...

아래는 3.3V 짜리를 5V인 아두이노에서 쓰는거지만...

[링크 : http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter]

2016/04/01 - [embeded/arduino(genuino)] - 아두이노 level shift / MPU-6050


The Raspberry Pi is running at 3.3 Volts while the Arduino is running at 5 Volts. There are tutorials suggest using a level converter for the I2C communication. This is NOT needed if the Raspberry Pi is running as “master” and the Arduino is running as “slave”.


The reason it works is because the Arduino does not have any pull-ups resistors installed, but the P1 header on the Raspberry Pi has 1k8 ohms resistors to the 3.3 volts power rail. Data is transmitted by pulling the lines to 0v, for a “high” logic signal. For “low” logic signal, it’s pulled up to the supply rail voltage level. Because there is no pull-up resistors in the Arduino and because 3.3 volts is within the “low” logic level range for the Arduino everything works as it should.

[링크 : http://blog.oscarliang.net/raspberry-pi-arduino-connected-i2c/]

    [링크 : http://dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors]

[링크 : http://blog.retep.org/2014/02/15/connecting-an-arduino-to-a-raspberry-pi-using-i2c/]




걍.. 과감하게(?) atmega 녀석들이 대부분 2.8V~5.5V 니까 3.3V로 주면 안되려나?


Operating Voltage:

1.8 - 5.5V


TWI(I2C)쪽 입력 전압은 Vcc + 0.5 니까.. 3.3V 주면은.. 어떻게 안되려나?

그나저나.. 0.3V~0.7V 로 무지 좁네..



[링크 : http://www.atmel.com/...atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet_complete.pdf]

Posted by 구차니
이론 관련2016. 4. 6. 09:39

어... 단순하게 arctan으로 하면 땡~이 아니었던게야?!?!?!





void calc_xy_angles(void){

   // Using x y and z from accelerometer, calculate x and y angles

   float x_val, y_val, z_val, result;

   unsigned short long x2, y2, z2; //24 bit


   // Lets get the deviations from our baseline

   x_val = (float)accel_value_x-(float)accel_center_x;

   y_val = (float)accel_value_y-(float)accel_center_y;

   z_val = (float)accel_value_z-(float)accel_center_z;


   // Work out the squares 

   x2 = (unsigned short long)(x_val*x_val);

   y2 = (unsigned short long)(y_val*y_val);

   z2 = (unsigned short long)(z_val*z_val);


   //X Axis

   result=sqrt(y2+z2);

   result=x_val/result;

   accel_angle_x = atan(result);


   //Y Axis

   result=sqrt(x2+z2);

   result=y_val/result;

   accel_angle_y = atan(result);


[링크 : http://www.hobbytronics.co.uk/accelerometer-info]


[링크 : https://cache.freescale.com/files/sensors/doc/app_note/AN3461.pdf]

[링크 : http://www.st.com/web/en/resource/technical/document/application_note/CD00268887.pdf]

[링크 : http://www.analog.com/media/en/technical-documentation/application-notes/AN-1057.pdf]


Posted by 구차니
embeded/raspberry pi2016. 4. 5. 16:00

음.. FREX 핀은있으나.. 웬지 라즈베리용 카메라에는 FREX를 빼놓지 않았을 기분?



43p



[링크 : http://www.seeedstudio.com/wiki/images/3/3c/Ov5647_full.pdf]

[링크 : http://www.ovt.com/uploads/parts/OV5647.pdf]


어? 120p가 안돼?

Frame rate up to 120 fps

max 90fps. Limitations on frame size for the higher frame rates (VGA only for above 47fps)


그리고.. external / internal sync. 미지원

Support for internal and external frame synchronisation for frame exposure mode

No

[링크 : https://www.raspberrypi.org/documentation/hardware/camera.md]

Posted by 구차니
embeded/raspberry pi2016. 4. 5. 15:25

한마디로 4채널까진 해상도 좀 낮춰서 1Gbps 보다 낮게 설정하면(동시 4채널까진 가능하단건가?)



[링크 : https://github.com/ivmech/ivport/wiki/Capture-Sequence]

[링크 : https://github.com/ivmech/ivport]


[링크 : http://www.arducam.com/multi-camera-adapter-module-raspberry-pi/]

[링크 : http://www.ivmech.com/.../ivport-raspberry-pi-camera-module-multiplexer-p-90]

[링크 :http://www.ivmech.com/.../ivport-dual-raspberry-pi-camera-module-multiplexer-p-104 ]




+

OV5647 can be synched with another sensor using the FREX pin input/output (works also in rolling shutter mode). Needs support in driver though. Guess the FREX pin is not even used in Raspberry Pi Camera design, at least Omnivision reference desing tells not to populate the zero ohm resistor which connect this pin to connector.

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?p=483936]



The Raspberry Pi has a Mobile Industry Processor Interface (MIPI) Camera Serial Interface Type 2 (CSI-2)

MIPI CSI-2 version 1.01 supports up to four data lanes, where each lane has a maximum of 1 Gbps bandwidth, to provide a total bandwidth of 4 Gbps.

[링크 : http://www.petervis.com/Raspberry_PI/Raspberry_Pi_CSI/Raspberry_Pi_CSI_Camera_Interface.html]



음? 카메라 모듈이 기본 2개니까.. 2채널은 동시?


MIPI interface (two lanes) Yes

[링크 : https://www.raspberrypi.org/documentation/hardware/camera.md]



compute module에는 카메라가 두개 꽂히나 보네?

[링크 : https://www.raspberrypi.org/blog/real-time-depth-perception-with-the-compute-module/]

[링크 : http://www.argondesign.com/case-studies/2014/oct/21/stereo-depth-perception-raspberry-pi/]




[링크 : https://www.raspberrypi.org/.../computemodule/RPI-CMIO-V1_2-SCHEMATIC.pdf]


[링크 : https://www.raspberrypi.org/.../raspberrypi/schematics/RPI-3B-V1_2-SCHEMATIC-REDUCED.pdf]

Posted by 구차니


ext. sync 라고 되어 있는 구멍이 장비들에 있어서

그게 명칭인줄 알았더니.. genlock이 명칭인가?



[링크 : http://wiki.edgertronic.com/index.php/Genlock]

[링크 : http://www.bhphotovideo.com/.../timecode-versus-sync-how-they-differ-and-why-it-matters]

[링크 : https://en.wikipedia.org/wiki/Genlock]

'이론 관련 > 전기 전자' 카테고리의 다른 글

bayer 포맷 출력...?  (0) 2016.04.14
패럿(farad) / 암페어(ampere) 변환  (0) 2016.04.14
tri-state  (0) 2016.03.30
solid state  (0) 2016.01.17
디지털 서보(?)  (0) 2015.11.24
Posted by 구차니

만원짜리 옷입니다(어?)





망할 이니페이로 인해서 신용카드로 하려다가 무통장으로 전환 ㅠㅠ

망할 이니페이 ㅠㅠ

Posted by 구차니
Linux API/linux2016. 4. 4. 09:21

어떻게 보면 당연한..(?)

함수 포인터


#include <stdio.h>

#include <dlfcn.h>

#include "ctest.h"


int main(int argc, char **argv) 

{

   void *lib_handle;

   double (*fn)(int *);

   int x;

   char *error;


   lib_handle = dlopen("/opt/lib/libctest.so", RTLD_LAZY);

   if (!lib_handle) 

   {

      fprintf(stderr, "%s\n", dlerror());

      exit(1);

   }


   fn = dlsym(lib_handle, "ctest1");

   if ((error = dlerror()) != NULL)  

   {

      fprintf(stderr, "%s\n", error);

      exit(1);

   }


   (*fn)(&x);

   printf("Valx=%d\n",x);


   dlclose(lib_handle);

   return 0;

[링크 : http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html]


[링크 : http://linux.die.net/man/3/dlopen]

[링크 : http://linux.die.net/man/3/dlsym]

'Linux API > linux' 카테고리의 다른 글

메시지 큐 - ipc  (0) 2016.06.28
pthread mutex shm_open  (0) 2016.06.27
리눅스 커널 모듈 관련 문서  (0) 2015.11.06
readl(), writel()  (0) 2015.11.06
리눅스 모듈 프로그래밍 관련  (0) 2015.10.30
Posted by 구차니
Programming/C Win32 MFC2016. 4. 4. 09:20

엥.. 왜 이런거 관련 내용이 검색이 안되지 -ㅁ-?


    hInst = LoadLibrary("SmallDll.dll");

    if(hInst == NULL)

        return 1;


    // 호출한 함수를 맵핑

    fAPlusB = (APlusB)GetProcAddress(hInst, "APlusB");

    fAMinusB = (AMinusB)GetProcAddress(hInst, "AMinusB"); 

[링크 : http://wwwi.tistory.com/72]



HMODULE WINAPI LoadLibrary(

  _In_ LPCTSTR lpFileName

);

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175(v=vs.85).aspx]



FARPROC WINAPI GetProcAddress(

  _In_ HMODULE hModule,

  _In_ LPCSTR  lpProcName

);

[링크 : https://msdn.microsoft.com/ko-kr/library/windows/desktop/ms683212(v=vs.85).aspx]



lib로 하는거네...

// MathFuncsDll.h

#ifdef MATHFUNCSDLL_EXPORTS

#define MATHFUNCSDLL_API __declspec(dllexport) 

#else

#define MATHFUNCSDLL_API __declspec(dllimport) 

#endif


// MyExecRefsDll.cpp

// compile with: /EHsc /link MathFuncsDll.lib 


[링크 : https://msdn.microsoft.com/ko-kr/library/ms235636.aspx]

'Programming > C Win32 MFC' 카테고리의 다른 글

MFC / stdlib / qsort example  (0) 2016.12.19
MFC UpdateData()  (0) 2016.12.16
가변 매크로 __VA_ARGS__  (0) 2016.03.18
#import ?  (0) 2015.12.21
"\n" 의 cpu 점유율?  (0) 2015.10.12
Posted by 구차니

왜이렇게 빨리해 ㄷㄷ




[링크 : http://www.hiseoulbike.com/]

Posted by 구차니
embeded/arduino(genuino)2016. 4. 1. 16:40

음.. 우리나라가 미친듯 비싸게 파는걸려나..


The MPU-6050 is not expensive, especially given the fact that it combines both an accelerometer and a gyro.

[링크 : http://playground.arduino.cc/Main/MPU-6050]



어라.. 3.3V 짜리인 i2c 장비를 레벨 쉬프트 하지 않고 쓸수가 있나보네?


[링크 : http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter]

Posted by 구차니