Go to Post The folks in Indiana don't play around. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 05-08-2014, 14:02
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 147
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Arduino + CRIO

https://github.com/FRC-Team-4143/swerveneopixel

This sketch controls Adafruit neopixel leds over i2c. I2c is echoed over serial for debugging.

Crio code (in c++) is something like:
Code:
m_i2c = DigitalModule::GetInstance(1)->GetI2C(0x04 << 1);
RobotMap::m_i2c->Write(0x0, 50);
The first 0x0 is the command. The 50 is a parameter to the command in the sketch.

The i2c address is 0x4, but you have to shift it left on the Crio to write. That is the tricky part.
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com

Last edited by RyanShoff : 05-08-2014 at 14:11. Reason: changed parameter to not get confused with address
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi