Open Phli1 opened 2 years ago
Update: I still get this encoded value, also the T-Display crashes after a while - maybe because it can't handle the encoded blurr?
BUT: I managed to get one motor working - it's very responsive, thank you for this code! What irritates me is that this motor only works when A1 and B1/B2 are connected to the motor... Shouldn't just B1 or B2 work? And to start with, motor 1 should be connected to A1 and A2, right? This could be a hardware issue though, I will continue testing.
Hi Phil, i would need to know more info about the problem to try to reproduce it, specially the wiring scheme and the library you are using for the screen, the values from the web page come as a "###,###" string format value, there should be no encoding, you can see the simple parsing on main file:
void handle_message(WebsocketsMessage msg) {
commaIndex = msg.data().indexOf(',');
LValue = msg.data().substring(0, commaIndex).toInt();
RValue = msg.data().substring(commaIndex + 1).toInt();
motor1.drive(LValue);
motor2.drive(RValue);
}
Guessing for what i understand about the problem i would say you have:
Hi, I tried to connect it, changed the pins etc. and connected to the IP-adress from the serial monitor. The motors didn't move, so I printed out the readings of the joystick, when I move it: ...�␡?���Slp␜',��␔ô@��Cw␙�]
��[I�:�ǖ␓ؖ�?I~�#�{癛�$�Λ�9��_ ��␚.��$�␋�o-#�Jy&�* ␙ x"X"��U␔��␟�e␔��␚85R�D"�q?␏h����5�"g���w.�␡?���Slp␜',��␔ô@��Cw␙�]
�[I��␚.��$�␋�o-#�Jy&�* Λ�9�x"X"��U␔��␟�e␔��␚85R�D"�q?␏h����5�"g���w.. The dots printed [programmed by me], when the joystick stayed in the centre, so apparently it notices, when I do something... In the gibberish you can also see "X"... Did someone else have this problem? How can I fix it? My hardware: TTGO T-Display, TB6612FNG.