avr-lis3dh

command module
v0.0.0-...-791dcf9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2016 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

STマイクロエレクトロニクスの3軸加速度センサ LIS3DH にAVRからSPIで接続するサンプル. 同じくSTマイクロのジャイロセンサ L3GD20 も使えます.

利用方法

PC等 <--(シリアル)--> AVR <--(SPI)--> LIS3DH
  • TODO: 回路図
  • SPIで通信するのでSCK,MISO,MOSIをつないでください
  • PB1, PB2 をCSにつなぐことで2デバイス接続できます
  • シリアルからコマンドを受け付けます

近藤科学のB3Mシリーズのサーボモータと同一フォーマットのコマンドに返答します.(1.5Mbpsで通信するためにはAVRを12MHzで動作させる必要があります)

メモリマップ

  • 0x00 device id. (R/W)
  • 0x10~0x4F sensor1 (センサのデータシート参照)
  • 0x50~0x8F sensor2 (センサのデータシート参照)
  • 0xA2~0xB2 device description (R)

Golangから使う場合

GetServo()とかしてますがサーボモータではないので加速度や角速度の値が取れます.

ライセンス

Copyright 2016 Kousuke Kawahira

Released under the MIT license

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址