Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

EV3-API for Programming the LEGO Mindstorms EV3 in C

NotificationsYou must be signed in to change notification settings

simonedegiacomi/EV3-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This API supports the following functionalities:

  • Controlling LEGO motors
  • Reading from the following sensors:
    • Touch
    • Ultrasonic
    • Color
    • Gyro
    • Infrared
    • HiTechnic Color Sensor V2
    • HiTechnic Compass Sensor
    • HiTechnic Infrared Sensor
    • NXT Temperature
    • NXT Sound
    • Pixy Cam
  • Controlling Buttons and LEDs
  • Printing text on LCD
  • Playing sounds and audio files

Requirements

In order to compile a program that uses this library, or to rebuild this library, you need a compatible ARM toolchain.You can download the one from theofficial c4ev3 repository.

Using the library

Download library from thereleases page. Each releases consist of azip file that contains aninclude folder, with all the headers, and alib folder, which contains the built static library.There are two versions of static library: glibc and uclibc. While compiling, specify the right version to use according to your compiler.

If you are using the toolchain from c4ev3, use the uclibc version.

Create now a new file:

// hello.c#include<ev3.h>intmain () {InitEV3();LcdTextf(LCD_COLOR_BLACK,0,0,"Hello world!");Wait(5000);FreeEV3();return0;}

Then compile it with:

arm-c4ev3-linux-uclibcgnueabi-gcc hello.c -I /path/to/c4ev3/include -L /path/to/c4ev3/include/lib/uclibc -lev3api

or with (if you're using a glibc compiler)

arm-linux-gnueabi-gcc hello.c -I /path/to/c4ev3/include -L /path/to/c4ev3/include/lib/glibc -lev3api

Finally, useev3duder to upload the program to the robot.

Documentation

You can find the documentation here:https://simonedegiacomi.github.io/EV3-API/files.html

About

EV3-API for Programming the LEGO Mindstorms EV3 in C

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C98.1%
  • C++1.2%
  • Other0.7%

[8]ページ先頭

©2009-2025 Movatter.jp