Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_O defined as unsigned int in Oscillator.h #15

Closed
sushicodeur opened this issue Nov 8, 2017 · 6 comments
Closed

_O defined as unsigned int in Oscillator.h #15

sushicodeur opened this issue Nov 8, 2017 · 6 comments
Labels
Arduino issues related with .ino files and libraries

Comments

@sushicodeur
Copy link

Hello,

I'm trying to make Otto work on my Esp8266.

It works quite well so far except for some very strange behaviors on oscillateServos function. For example if I run Otto.updown(6, 500, BIG); the right foot is totally up.

After some investigation it looks like for this function O is int O[4] = {0, 0, h, -h}; so if you call updown with BIG you end up with these values {0,0, 30, -30}.

So far so good (well on arduino at last).

But on my ESP as _O is declared unsigned it takes 4,294,967,295 as a value... too much for my servo :)

So my question is : is it normal that _O is declared unsigned or is it a bug in Oscillator.h ?

@cparrapa
Copy link
Member

cparrapa commented Nov 9, 2017

Hello
Awesome finally someone will make it!
hmmmm that value is to high maybe is a bug that wasn't noticeable in Arduino

Thanks!
Welcome to the Otto builder community!

@sushicodeur
Copy link
Author

I can confirm that changing the way _O is declared fixed the problem on my Esp Otto silly walk...

I now move on with the rest of the sketches and some more fun :)

I forked the repo here : https://github.com/sushicodeur/OttoOnEsp

@cparrapa
Copy link
Member

Great thanks! feel free to pull a request with a new folder or something i will just approve

@sushicodeur
Copy link
Author

I wait for my arduino nano to ship with ultrasonic sensor and shield, so I can test that my changes don't break on arduino.

@cparrapa
Copy link
Member

sure thanks for contributing! ;D

@cparrapa
Copy link
Member

Hey how is it going so is possible ESP with Otto?

@cparrapa cparrapa added the Arduino issues related with .ino files and libraries label Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arduino issues related with .ino files and libraries
Projects
None yet
Development

No branches or pull requests

2 participants