Comments (6)
OK, I'll try.
The problem with capturing is that I have to establish several sessions until one gets captured and even then just for a while so have to be quick. Not sure if it is a problem with my Android phone (I don't have an Android tablet with BLE), BOOST, my laptop or even ubertooth sniffer itself.
Will also give some whole capture files for everybody to look at it instead of just waiting for my findings.
I only capture late at night because it requires full attention so expect just a few captures each night.
from boostreveng.
OK, I got it.
motor A 50º at 100%:
0e:00:81:37:11:0b:32:00:00:00:64:64:7f:03
4th byte = 37h = motor A
7th byte = 32h = 50d
117th byte = 64h = 100d
motor A 1º at 100%:
0e:00:81:37:11:0b:01:00:00:00:64:64:7f:03
motor A 25º (19h) at 50% (32h):
0e:00:81:37:11:0b:19:00:00:00:32:64:7f:03
I can turn motor A by 1º at 100% duty cycle with:
gatttool -b 00:16:53:A4:CD:7E --char-write-req --handle=0x0e --value=0e008137110b0100000064647f03
Sorry but don't have capture files. Today I can't capture not even one initiall connection session. I'm at work (my first captures were at home and then I went on holidays) and there are a few laptops and smartphones around... I think my ubertooth sniffer needs a clean environment to work.
To get this captures I had to keep pressing the green start/run/play/whatever block until something was captured.
from boostreveng.
I tried to capture a long rotation command but cannot capture anything else and I'm getting warnings that battery is low (but it is not, at least the battery level shown when selecting the LEGO Move Hub is Full).
But the maximum angle that the App allows is 9999 or 27 full rotations and a bit more than 3/4 (9999 = 27x360+270+9 degrees) that will be 270Fh so only two bytes are needed.
from boostreveng.
I think @hobbyquaker got sniffing equipment as well now and may soon provide captures as well.
Wrt my original issue, I can do this know. The motor-angle notifications report the location of the motor, and you can simply rotate until you reach the desired state (w/ a low dutycycle to keep it precise). We have all that is necessary documented.
I'm keeping this issue open, since I still wonder whether there might be an additional "turn-to" packet in addition to the "turn-by" and "duration" ones we already have.
from boostreveng.
If such a command exists we need a block in the App to generate it for capture or keep trying issuing our own commands randomly.
But honestly I don't expect it. I don't see the BOOST designed as a robotic product. Perhaps things change and future firmware versions make me change my opinion.
from boostreveng.
Going through Lego BLE doc, and I think their "GotoAbsolutePosition" is just what you need.
Here is a quick example of command in Swift. Though, no guarantee that it works properly
public let portId: PortId
public let absPos: Int32
public let speed: Int8
public let maxPower: UInt8
public init(portId: PortId, absPos: Int32, speed: Int8, maxPower: UInt8 = 100) {
self.portId = portId
self.absPos = absPos
self.speed = speed
self.maxPower = maxPower
}
public var data: Data {
let speed = UInt8(bitPattern: self.speed)
let degreeBytes = withUnsafeBytes(of: absPos.littleEndian, Array.init)
var d = Data([0x09, 0x00, 0x81, portId, 0x11, 0x0D])
d.append(contentsOf: degreeBytes)
d.append(speed)
d.append(maxPower)
d.append(EndState.breakFlag.rawValue)
return d
}
}```
from boostreveng.
Related Issues (19)
- Create a Slack for coordination HOT 5
- 6-axis tilt sensor HOT 2
- another way to program it directly with iPad or iPhone HOT 1
- D = 02 HOT 3
- identify LEGO App blocks HOT 3
- Unable to make the app inventor example work HOT 4
- Slack invite link in readme.md not valid anymore HOT 5
- Command crib sheet with names
- How to wrap this up into a nice API HOT 10
- Train motor AutoID/resistor? HOT 4
- BOOST Color and Distance Sensor info HOT 61
- BLE Advertising Data HOT 5
- Any possibility for LEGO App-Controlled Batmobile 76112? HOT 2
- BLE protocol changed
- gattlib not working HOT 3
- First byte in commands HOT 2
- Nodejs API HOT 2
- ColorSensors: Byte 2/3/4. HOT 93
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boostreveng.