User Tools

Site Tools


journal:201403

cam350 merge

이슈

  1. origin 바뀌는 문제 → eaglecam 바꿔서 해결. altium은 그냥 잘됨
  2. explode all → 이거 하기는 하는데 뭐하는건지 모르겠네.
  3. layer 이름 정리 → eaglecam 에서 만드는 이름과 altium이름이 다름. 정리하긴 했는데 dimension layer 이름은 를 어떻게 할지 …

NRF 51822

BLE 모듈 개발

개발환경 다운로드

1. S110-SD-v6 2. mdk 3. sdk 4. nrfg0

참고: google Simple BLE sensor application using Nordic semi

BLE OSX App 만들기

상황(Situation): bluetooth 스펙도 잘모르고 Core bluetooth도 써본적이 없고, osx 앱도 만들어 본적이 없다. 대체적으로 모른다. ble 모듈개발을 위해 nordic ble 모듈 펌웨어를 읽은적이 있다.

목적(Task): Core bluetooth에서 discover, connect, and retrieve data 하는 간단한 Bluetooth4.0 어플리케이션 만들기

한일(Action*):

  1. 튜토리얼 보고 BLE OSX App을 만들어 본다
  2. 커맨드라인에서 BLE 다루는 테스트 스크립트 만들기http://joost.damad.be/2013/08/experiments-with-bluetooth-low-energy.html

결과(Result):

  1. 1번 Action에 대한 결과:

배운점(Reflection)

튜토리얼:

//
//  BPAppDelegate.m
//  BLEPeripheral
//
//  Created by Sandeep Mistry on 10/28/2013.
//  Copyright (c) 2013 Sandeep Mistry. All rights reserved.
//
 
#import <objc/runtime.h>
#import <objc/message.h>
 
#import "BPAppDelegate.h"
 
@interface CBXpcConnection : NSObject //{
//    <CBXpcConnectionDelegate> *_delegate;
//    NSRecursiveLock *_delegateLock;
//    NSMutableDictionary *_options;
//    NSObject<OS_dispatch_queue> *_queue;
//    int _type;
//    NSObject<OS_xpc_object> *_xpcConnection;
//    NSObject<OS_dispatch_semaphore> *_xpcSendBarrier;
//}
//
//@property <CBXpcConnectionDelegate> * delegate;
 
- (id)allocXpcArrayWithNSArray:(id)arg1;
- (id)allocXpcDictionaryWithNSDictionary:(id)arg1;
- (id)allocXpcMsg:(int)arg1 args:(id)arg2;
- (id)allocXpcObjectWithNSObject:(id)arg1;
- (void)checkIn;
- (void)checkOut;
- (void)dealloc;
- (id)delegate;
- (void)disconnect;
- (void)handleConnectionEvent:(id)arg1;
- (void)handleInvalid;
- (void)handleMsg:(int)arg1 args:(id)arg2;
- (void)handleReset;
- (id)initWithDelegate:(id)arg1 queue:(id)arg2 options:(id)arg3 sessionType:(int)arg4;
- (BOOL)isMainQueue;
- (id)nsArrayWithXpcArray:(id)arg1;
- (id)nsDictionaryFromXpcDictionary:(id)arg1;
- (id)nsObjectWithXpcObject:(id)arg1;
- (void)sendAsyncMsg:(int)arg1 args:(id)arg2;
- (void)sendMsg:(int)arg1 args:(id)arg2;
- (id)sendSyncMsg:(int)arg1 args:(id)arg2;
- (void)setDelegate:(id)arg1;
 
@end
 
@implementation CBXpcConnection (Swizzled)
 
- (void)sendMsg1:(int)arg1 args:(id)arg2
{
    NSLog(@"sendMsg: %d, %@", arg1, arg2);
 
    if ([self respondsToSelector:@selector(sendMsg1:args:)]) {
        [self sendMsg1:arg1 args:arg2];
    }
}
 
- (void)handleMsg1:(int)arg1 args:(id)arg2
{
    NSLog(@"handleMsg: %d, %@", arg1, arg2);
 
    if ([self respondsToSelector:@selector(handleMsg1:args:)]) {
        [self handleMsg1:arg1 args:arg2];
    }
}
 
@end
 
@interface BPAppDelegate ()
 
@property (nonatomic, strong) CBPeripheralManager *peripheralManager;
@property (nonatomic, strong) CBMutableService *service;
 
@end
 
 
@implementation BPAppDelegate
 
//#define XPC_SPY 1
 
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
#ifdef XPC_SPY
    // Insert code here to initialize your application
    Class xpcConnectionClass = NSClassFromString(@"CBXpcConnection");
 
    Method origSendMethod = class_getInstanceMethod(xpcConnectionClass,  @selector(sendMsg:args:));
    Method newSendMethod = class_getInstanceMethod(xpcConnectionClass, @selector(sendMsg1:args:));
 
    method_exchangeImplementations(origSendMethod, newSendMethod);
 
    Method origHandleMethod = class_getInstanceMethod(xpcConnectionClass,  @selector(handleMsg:args:));
    Method newHandleMethod = class_getInstanceMethod(xpcConnectionClass, @selector(handleMsg1:args:));
 
    method_exchangeImplementations(origHandleMethod, newHandleMethod);
#endif
 
    self.peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil];
}
 
- (void)peripheralManagerDidUpdateState:(CBPeripheralManager *)peripheral
{
    NSLog(@"peripheralManagerDidUpdateState: %d", (int)peripheral.state);
 
    if (CBPeripheralManagerStatePoweredOn == peripheral.state) {
 
        NSData *zombie = [@"zombie" dataUsingEncoding:NSUTF8StringEncoding];
        CBMutableCharacteristic *characteristic = [[CBMutableCharacteristic alloc] initWithType:[CBUUID UUIDWithString:@"DDCA9B49-A6F5-462F-A89A-C2144083CA7F"] properties:CBCharacteristicPropertyRead value:zombie permissions:CBAttributePermissionsReadable];
 
        self.service = [[CBMutableService alloc] initWithType:[CBUUID UUIDWithString:@"BD0F6577-4A38-4D71-AF1B-4E8F57708080"] primary:YES];
        self.service.characteristics = @[characteristic];
 
        [self.peripheralManager addService:self.service];
    } else {
        [peripheral stopAdvertising];
        [peripheral removeAllServices];
    }
}
 
 
- (void)peripheralManagerDidStartAdvertising:(CBPeripheralManager *)peripheral error:(NSError *)error
{
    NSLog(@"peripheralManagerDidStartAdvertising: %@", error);
}
 
- (void)peripheralManager:(CBPeripheralManager *)peripheral didAddService:(CBService *)service error:(NSError *)error
{
    NSLog(@"peripheralManagerDidAddService: %@ %@", service, error);
 
    [peripheral startAdvertising:@{
                                   CBAdvertisementDataLocalNameKey: @"hello"
                                   }];
}
 
 
@end

전기자동차

3월 14일

load cell 구입

계측기용 opamp 사용해서 load cell 읽어서 체중계 구현

phidgets의 몰렉스 커넥터 http://www.phidgets.com/

  1. PCB보드 커넥터 0705530037
  2. 케이블 커넥터 50-57-9403

3월 15일

바리가 동물병원 갔다 왔네. 관절염과 비만 그리고 콩팥에 두개의 결석 오는길에 목동 10단지 빵집에서 빵 먹었는데, 맛이 좋다. 브레드박스

오늘 할일

  • 하드웨어 워크숍 준비물 준비
  • 기차표(7시) 예매
  • 델 VGA커넥터 찾기

제품제작

3월 16일

바이폴라 접합 트랜지스터에 대한 이해. KOCW와 전자회로책(?) 보고 정리

영남대학교 전자회로 강좌 http://www.kocw.net/home/search/kemView.do?kemId=705901

대신호 등가회로(DC 등가회로) 해석: 이상적, 정전압, 비선형 모델, 전류전압 그래프.

소신호 등가회로(AC 등가회로)

journal/201403.txt · Last modified: 2018/07/18 14:10 by 127.0.0.1