M4 Eyes API?

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
elin05
 
Posts: 78
Joined: Tue Jun 11, 2013 4:27 pm

M4 Eyes API?

Post by elin05 »

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?

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: M4 Eyes API?

Post by dastels »

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

User avatar
elin05
 
Posts: 78
Joined: Tue Jun 11, 2013 4:27 pm

Re: M4 Eyes API?

Post by elin05 »

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
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?

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: M4 Eyes API?

Post by dastels »

user_watch.cpp
and heat_sensor.cpp

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”