GNU General Public License v3.0

项目介绍

FluxGarage/RoboEyes 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 GNU General Public License v3.0 许可证,目前获得 946 个 Star、120 次 Fork。

仓库全名
FluxGarage/RoboEyes
开源许可证
GNU General Public License v3.0
Star 数
946
Fork 数
120
未关闭 Issue
9

README 摘要

FluxGarage RoboEyes Library Draws smoothly animated robot eyes on OLED displays, using the Adafruit GFX library. Robot eye shapes are configurable in terms of width, height, border radius and space between. Several different mood expressions (happy, tired, angry, default) and animations (autoblinker, idle, laughing, confused) are available. All state changes have smooth transitions and thus, complex animation…

完整内容见 GitHub 原始 README 或本页 。

常见问题

RoboEyes 用什么语言开发?

主要使用 C++ 编写,采用 GNU General Public License v3.0 许可证,目前有 946 个 Star。

RoboEyes 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 RoboEyes 的源码?

可以直接克隆仓库:git clone https://github.com/FluxGarage/RoboEyes.git,默认分支为 main;安装与运行步骤见仓库 README。

RoboEyes 最近还在维护吗?

仓库最近一次更新为 1月20日,当前有 9 个未关闭 Issue;Star 数为 946,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

The FluxGarage RoboEyes library draws smoothly animated robot eyes on OLED displays, using the Adafruit GFX library.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1213
价值分
605
活跃状态
活跃

语言占比

C++

Release

README

FluxGarage RoboEyes Library

Draws smoothly animated robot eyes on OLED displays, using the Adafruit GFX library. Robot eye shapes are configurable in terms of width, height, border radius and space between. Several different mood expressions (happy, tired, angry, default) and animations (autoblinker, idle, laughing, confused) are available. All state changes have smooth transitions and thus, complex animation sequences are easily feasible.

Developing this library was the first step of a larger project: the creation of my own DIY robot from the design perspective. Check out the FluxGarage Youtube Channel.

Watch the Demo and Getting Started Videos on Youtube

#1 - Smoothly Animated Robot Eyes on OLED Displays with the Robo Eyes Library #2 - Getting Started With the Free Robo Eyes Arduino Library

Installation

  1. Open the Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries…
  3. Search for “FluxGarage RoboEyes”
  4. Click Install

After installation, the example sketches can be found under
File → Examples → FluxGarage RoboEyes.

Functions

General

  • begin() (screen-width, screen-height, max framerate)
  • update() update eyes drawings in the main loop, limited by max framerate as defined in begin()
  • drawEyes() same as update(), but without the framerate limitation
  • setDisplayColors() (uint8_t background, uint8_t main) -> background: background and overlays, choose 0 for monochrome displays and 0x00 for grayscale displays such as SSD1322 -> main: drawings, choose 1 for monochrome displays and 0x0F for grayscale displays such as SSD1322 (0x0F = maximum brightness)

Define Eye Shapes, all values in pixels

  • setWidth() (byte leftEye, byte rightEye)
  • setHeight() (byte leftEye, byte rightEye)
  • setBorderradius() (byte leftEye, byte rightEye)
  • setSpacebetween() (int space) -> can also be negative
  • setCyclops() (bool ON/OFF) -> if turned ON, robot has only on eye

Define Face Expressions (Mood, Curiosity, Eye-Position, Open/Close)

  • setMood() mood expression, can be TIRED, ANGRY, HAPPY, DEFAULT
  • setPosition() cardinal directions, can be N, NE, E, SE, S, SW, W, NW, DEFAULT (default = horizontally and vertically centered)
  • setCuriosity() (bool ON/OFF) -> when turned on, height of the outer eyes increases when moving to the very left or very right
  • setSweat() (bool ON/OFF) -> when turned on, animated sweat drops appear in the upper screen area
  • open() open both eyes -> open(1,0) opens left eye only
  • close() close both eyes -> close(1,0) closes left eye only

Set Horizontal and/or Vertical Flicker

Alternately displaces the eyes in the defined amplitude in pixels:

  • setHFlicker() (bool ON/OFF, byte amplitude)
  • setVFlicker() (bool ON/OFF, byte amplitude)

Play Prebuilt Oneshot Animations

  • anim_confused() confused -> eyes shaking left and right
  • anim_laugh() laughing -> eyes shaking up and down
  • blink() close and open both eyes
  • blink(0,1) close and open right eye

Macro Animators

Blinks both eyes randomly:

  • setAutoblinker() (bool ON/OFF, int interval, int variation) -> turn on/off, set interval between each blink in full seconds, set range for additional random interval variation in full seconds

Repositions both eyes randomly:

  • setIdleMode() (bool ON/OFF, int interval, int variation) -> turn on/off, set interval between each eye repositioning in full seconds, set range for additional random interval variation in full seconds

Further (Inofficial) Resources by Other Users

评论

暂无评论