Compare commits
2 Commits
8fec829754
...
9f3f039bb0
Author | SHA1 | Date |
---|---|---|
|
9f3f039bb0 | |
|
eb704397ff |
6
IO.hpp
6
IO.hpp
|
@ -39,8 +39,6 @@ class Motor {
|
||||||
|
|
||||||
ledcAttachChannel(m_pin, 5000, 12, m_channel);
|
ledcAttachChannel(m_pin, 5000, 12, m_channel);
|
||||||
ledcWriteChannel(m_channel, 0);
|
ledcWriteChannel(m_channel, 0);
|
||||||
//ledcSetup(m_channel, 5000, 12); // Channel, Frequency, Resolution
|
|
||||||
//ledcAttachPin(m_pin, m_channel); // Attach pin to channel
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -114,9 +112,9 @@ class IO {
|
||||||
if(millis() - last_color_change_time > 1000 && has_color_changed)
|
if(millis() - last_color_change_time > 1000 && has_color_changed)
|
||||||
{
|
{
|
||||||
m_screen.clearDisplay();
|
m_screen.clearDisplay();
|
||||||
//m_screen.drawBitmap(38, 0, Res::Imgs::riombotique, 52, 64, WHITE);
|
m_screen.drawBitmap(38, 0, Res::Imgs::riombotique, 52, 64, WHITE);
|
||||||
//m_screen.drawBitmap(75, 0, Imgs::poivron_robotique, 52, 64, WHITE);
|
//m_screen.drawBitmap(75, 0, Imgs::poivron_robotique, 52, 64, WHITE);
|
||||||
m_screen.drawBitmap(27, 0, Res::Imgs::diable_gaga, 75, 64, WHITE);
|
//m_screen.drawBitmap(27, 0, Res::Imgs::diable_gaga, 75, 64, WHITE);
|
||||||
|
|
||||||
has_color_changed = false;
|
has_color_changed = false;
|
||||||
}
|
}
|
||||||
|
|
6
Main.ino
6
Main.ino
|
@ -138,7 +138,7 @@ void loop()
|
||||||
case State::Turn90Blue:
|
case State::Turn90Blue:
|
||||||
my_IO.setDirWithAngularSpeed(-90.0f);
|
my_IO.setDirWithAngularSpeed(-90.0f);
|
||||||
|
|
||||||
if(my_IO.getAngle(Axes::Z) < -88.0f)
|
if(my_IO.getAngle(Axes::Z) < -80.0f)
|
||||||
{
|
{
|
||||||
actual_state = State::ForwardToSceneEdge;
|
actual_state = State::ForwardToSceneEdge;
|
||||||
}
|
}
|
||||||
|
@ -147,14 +147,14 @@ void loop()
|
||||||
case State::Turn90Yellow:
|
case State::Turn90Yellow:
|
||||||
my_IO.setDirWithAngularSpeed(90.0f);
|
my_IO.setDirWithAngularSpeed(90.0f);
|
||||||
|
|
||||||
if(my_IO.getAngle(Axes::Z) >= 88.0f)
|
if(my_IO.getAngle(Axes::Z) >= 80.0f)
|
||||||
{
|
{
|
||||||
actual_state = State::ForwardToSceneEdge;
|
actual_state = State::ForwardToSceneEdge;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case State::ForwardToSceneEdge:
|
case State::ForwardToSceneEdge:
|
||||||
my_IO.setSpeed(1024.0f);
|
my_IO.setSpeed(1100.0f);
|
||||||
|
|
||||||
if(my_IO.getAngle(Axes::Y) > 5.0f)
|
if(my_IO.getAngle(Axes::Y) > 5.0f)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue