Sphero Connectivity Package

버전 2.8.0.0 (730 KB) 작성자: Danvir Sethi
Control a Sphero from MATLAB and Simulink
다운로드 수: 1.3K
업데이트 날짜: 2018/7/16

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

Sphero is an inexpensive differential-drive robotic ball that can be controlled from a Bluetooth enabled device. It features a number of sensors (accelerometers, gyros, back-emf encoders) which allows it to measure its position and velocity with a fair degree of accuracy. The Sphero's RGB LEDs allow it to glow in any color of choice, while the blue back LED indicates its current orientation. Two wheels allow the Sphero to roll on the ground and to rotate along its vertical axis.
This package (which works with MATLAB releases 2014b and newer) allows us to communicate with a Sphero from within MATLAB (and Simulink), on a computer running either Windows or 64-bit version of Mac OS 10.7 or earlier.
The package is mainly based upon a "sphero" class, which in turn relies on the MATLAB Bluetooth class. The class methods and properties allow you to perform (within MATLAB) many operations available with the underlying Sphero API, such as connecting, disconnecting, sleeping, changing LED colors, reading (and/or streaming back) the Sphero's position and velocity, and commanding each of the 2 motors independently. An higher-level roll command can also be used to move the Sphero with a certain speed and direction. The Simulink library contained in the package also features Simulink blocks for setup, timing, and basic sensing and actuation.
The readme.txt file explains how to pair up the Sphero to your computer, install the package, and create Sphero objects in MATLAB, while several examples are also included to illustrate the use of the available commands and Simulink blocks.
NOTE that the 'readLocator' capability was temporarily removed in version 3.71 of the Sphero firmware, so if you need this functionality you need to use either an older or newer version of the firmware.

인용 양식

Danvir Sethi (2024). Sphero Connectivity Package (https://www.mathworks.com/matlabcentral/fileexchange/52481-sphero-connectivity-package), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
R2013a 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기
커뮤니티
 Power Electronics Control 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
2.8.0.0

Minor fixes:
* Updated output units of grey box and kinematic blocks
* Extend support for R2018a

2.6.0.0

* Raw motor block updated to expect a single input with 2 elements for left and right motor. This makes the block inline with the other blocks in the library
* Added blocks and example models for Kinematic Model and Grey Box Model for the Sphero

2.1.0.1

Updated license

2.1.0.0

Bug fix & extending support for MATLAB R2013a-R2014b
* 'AccRange' & 'rotationRate' removed, due to dropped support for these commands in Sphero API (in firmware 3.71)
* units.txt file added, indicating ranges of sensor data
* 'ReadSensor' block added

1.8.0.0