Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 2017NHKpin_config FEP ikarashiMDC
Fork of NHK2017_octopus2 by
bot/slider/slider.cpp
- Committer:
- UCHITAKE
- Date:
- 2017-09-17
- Branch:
- develop1
- Revision:
- 15:9aa11febe517
- Parent:
- 9:39be1525dfe0
- Child:
- 16:50651ff960b9
File content as of revision 15:9aa11febe517:
#include "slider.h" Slider::Slider(DigitalOut* RS485Controller, Serial* RS485) : slideMotor(RS485Controller, 1, 0, SM, RS485), encoder(Sensor4pin1a, Sensor4pin1b, NC, PULSES_PER_REV), limitSwitch(Sensor3pin3a) { slideMotor.braking = true; encoder.reset(); limitSwitch.rise(callback(this, &Slider::resetheight)); } void Slider::resetheight() { encoder.reset(); } void Slider::slide(float speed) { slideMotor.setSpeed(speed); }