M4 Eyes API?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- elin05
- Posts: 78
- Joined: Tue Jun 11, 2013 4:27 pm
M4 Eyes API?
I would like to have the eye positions be controlled by hardware (e.g. potentiometer or joystick). Is there an API for the M4 Eyes that can let me do this easily?
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: M4 Eyes API?
You can put code in the setup() and loop() functions in user.cpp. Similarly to the Arduino framework, setup() is called once when the system starts, and loop is called periodically. In loop you can check inputs and affect the eyes. The grid eye example might be a good one for you to look at.
There are several examples of this in the repo now.
Dave
There are several examples of this in the repo now.
Dave
- elin05
- Posts: 78
- Joined: Tue Jun 11, 2013 4:27 pm
Re: M4 Eyes API?
I see the repo (https://github.com/adafruit/Adafruit_Le ... er/M4_Eyes), but I don't see a grid eye example. Can you point me in the right direction?dastels wrote:You can put code in the setup() and loop() functions in user.cpp. Similarly to the Arduino framework, setup() is called once when the system starts, and loop is called periodically. In loop you can check inputs and affect the eyes. The grid eye example might be a good one for you to look at.
There are several examples of this in the repo now.
Dave
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: M4 Eyes API?
user_watch.cpp
and heat_sensor.cpp
and heat_sensor.cpp
Please be positive and constructive with your questions and comments.