Hi,
I just purchased the MonsterM4sk and I really love it!
However, I am wondering if there is a way to control the "blinking" speed of the eyes? I would like to make them blink slower.
Also, is there a way to control the direction they are looking? I would like to have the eyes focus on looking upwards.
Thanks a lot in advance!
MonsterM4sk - SLOW DOWN BLINKING?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15831
- Joined: Tue Oct 20, 2015 3:22 pm
Re: MonsterM4sk - SLOW DOWN BLINKING?
Customization is discussed in the product guide https://learn.adafruit.com/adafruit-monster-m4sk-eyes
The eye code is designed to allow user customization of how the code works. You can see that in the various user_*.cpp files in the source https://github.com/adafruit/Adafruit_Le ... er/M4_Eyes. For example, see https://learn.adafruit.com/monster-m4sk-is-watching-you. The user file user_pir.cpp plays with blinking.
Dave
The eye code is designed to allow user customization of how the code works. You can see that in the various user_*.cpp files in the source https://github.com/adafruit/Adafruit_Le ... er/M4_Eyes. For example, see https://learn.adafruit.com/monster-m4sk-is-watching-you. The user file user_pir.cpp plays with blinking.
Dave
- rarekitchenware
- Posts: 5
- Joined: Thu Jul 15, 2021 5:19 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
Thanks for the answer, Dave.
It's my first time working with something like this, so please excuse me if my questions are stupid. Do I need a PIR sensor to set the speed of the blinking? Is there an easy way I can specify the blinking speed in the config.eye code?
It's my first time working with something like this, so please excuse me if my questions are stupid. Do I need a PIR sensor to set the speed of the blinking? Is there an easy way I can specify the blinking speed in the config.eye code?
- dastels
- Posts: 15831
- Joined: Tue Oct 20, 2015 3:22 pm
Re: MonsterM4sk - SLOW DOWN BLINKING?
You'd only need a PIR sensor if you wanted them to respond in some fashion to movement.
I don't see a way to set blink speed in the config. You would have to write code in c++, in a user_xx.cpp file, e.g. user_slow_blink.cpp. I don't know off hand how you would effect blink speed, but I'm sure you'd be able to. Making them look up should be more straight-forward as you could use the code in user_watch.cpp and HeatSensor.cpp as an example of how to manipulate eyeTargetX and eyeTargetY.
Dave
I don't see a way to set blink speed in the config. You would have to write code in c++, in a user_xx.cpp file, e.g. user_slow_blink.cpp. I don't know off hand how you would effect blink speed, but I'm sure you'd be able to. Making them look up should be more straight-forward as you could use the code in user_watch.cpp and HeatSensor.cpp as an example of how to manipulate eyeTargetX and eyeTargetY.
Dave
- rarekitchenware
- Posts: 5
- Joined: Thu Jul 15, 2021 5:19 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
Hi Dave,
Thanks again for the reply. I looked into the codes you suggested, but my knowledge is not strong enough to be able to do this myself.
Would you be able/willing to explain to me step by step how I can make a simple code of the eyes looking upwards (the eye target) and then uploading it to the board?
I would be happy to renumerate you for your time.
Thanks again for the reply. I looked into the codes you suggested, but my knowledge is not strong enough to be able to do this myself.
Would you be able/willing to explain to me step by step how I can make a simple code of the eyes looking upwards (the eye target) and then uploading it to the board?
I would be happy to renumerate you for your time.
- dastels
- Posts: 15831
- Joined: Tue Oct 20, 2015 3:22 pm
Re: MonsterM4sk - SLOW DOWN BLINKING?
Please see viewtopic.php?f=51&t=181542&hilit=+monster#p882658 for an example that lets you control gaze direction (up/down/right/left/ahead) by commands over the serial/USB connection. The key is controlling the values of moveEyesRandomly, eyeTargetX, and eyeTargetX. In that post there's a link to instruction on how to build the software for the MonsterM4SK.
Dave
Dave
- RaspyBerryPi
- Posts: 4
- Joined: Mon Aug 02, 2021 11:14 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
rarekitchenware wrote:Hi Dave,
Thanks again for the reply. I looked into the codes you suggested, but my knowledge is not strong enough to be able to do this myself.
Would you be able/willing to explain to me step by step how I can make a simple code of the eyes looking upwards (the eye target) and then uploading it to the board?
I would be happy to renumerate you for your time.
I may be able to help you depending on what it is. If you're just wanting to change blinking speeds and such, it shouldnt be too difficult to edit :)
- RaspyBerryPi
- Posts: 4
- Joined: Mon Aug 02, 2021 11:14 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
Also.. .Dave... do you happen to know which file it is to control the intensity of how far the eyes move to the side when looking around?
- rarekitchenware
- Posts: 5
- Joined: Thu Jul 15, 2021 5:19 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
RaspyBerryPi wrote:rarekitchenware wrote:Hi Dave,
Thanks again for the reply. I looked into the codes you suggested, but my knowledge is not strong enough to be able to do this myself.
Would you be able/willing to explain to me step by step how I can make a simple code of the eyes looking upwards (the eye target) and then uploading it to the board?
I would be happy to renumerate you for your time.
I may be able to help you depending on what it is. If you're just wanting to change blinking speeds and such, it shouldnt be too difficult to edit :)
That would be amazing! I essentially just want to make the eyes look upwards (like they are looking at the sky) and blink less frequently than in the standard setting/mode.
- dastels
- Posts: 15831
- Joined: Tue Oct 20, 2015 3:22 pm
Re: MonsterM4sk - SLOW DOWN BLINKING?
The code is architected to allow behavior tweaking in a user*.cpp file (and additional files as required like in the AGM8833 gaze direction behavior). It's more a matter of what global variables to manipulate.RaspyBerryPi wrote:Also.. .Dave... do you happen to know which file it is to control the intensity of how far the eyes move to the side when looking around?
However, I don't see an easy way to control the radius of movement other than digging into the core code. Have a look at line 498 of M4_Eyes.ino. Try playing around with the calibration constant (the 0.6).
Dave
- rarekitchenware
- Posts: 5
- Joined: Thu Jul 15, 2021 5:19 am
Re: MonsterM4sk - SLOW DOWN BLINKING?
Do you think you would be able to help me out?RaspyBerryPi wrote:rarekitchenware wrote:Hi Dave,
Thanks again for the reply. I looked into the codes you suggested, but my knowledge is not strong enough to be able to do this myself.
Would you be able/willing to explain to me step by step how I can make a simple code of the eyes looking upwards (the eye target) and then uploading it to the board?
I would be happy to renumerate you for your time.
I may be able to help you depending on what it is. If you're just wanting to change blinking speeds and such, it shouldnt be too difficult to edit :)
Please be positive and constructive with your questions and comments.