DFrobot Vortex 0.9 - I'm searching for help in i2c

https://revspace.nl/Luteijn/Vortex?fbclid=IwAR3FZYKW9yBaCuXfusQ9CRnPmHF6zZgDpdv_Lun6vlV6w53hyAzS8Z4Oj44#Eyes

I have never used i2c before C. There’s usually a C++ /Arduino library for these things, but DFr dropped it. So Now I’m trying to low level the screen and I have no idea how to really do i2c. I’m wondering what signal address I could use to light the entire boards. :sweat:

I can’t find another (even half decent) place to post this question.

#include <Wire.h>
#define I2C_LED_ADDRESS 0b1100000
#define I2C_WRITE 0x00
uint8_t serial=0;
void setup(){
Wire.begin(); // join i2c bus (address optional for master)
delay(1000);
}
void loop(){
custom_eyes(1,1);
delay(250);
}

void custom_eyes(uint8_t color, uint8_t eyeline[10]){
uint8_t index;
// right eye left eye
//1 2 3 4 5 - 25 24 23 22 21
//6 7 8 9 10 - 20 19 18 17 16
//11 12 13 14 15 - 15 14 13 12 11
//16 17 18 19 20 - 10 9 8 7 6
//21 22 23 24 25 - 5 4 3 2 1
Wire.beginTransmission(I2C_LED_ADDRESS << 1 | I2C_WRITE); // transmit to device #4
Wire.write(0x55); // color 55=custom eyes follow
Wire.write(0xAA); // ?? AA=color followed by 10 bytes, each defining one line
// other values cause eyes to light up in multiple colors, needs more work
Wire.write(color&0x7); //color 1-B,2-G,4-R of foreground
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.endTransmission(); // stop transmitting
}

Wait…they all went on, but it’s super buggy…

[Buggy] Flashing, unwanted fluctuating results, disrupting

By plugging it via microB

Edit-
btw -I noticed I forgot to delete serial from global.
Edit-
I deleted the delay and it blinks due to endTransmission(). I have changed to 2k. It’s blinks on 2 secs. Going to continue to experiment with that…

#include <Wire.h>
#define I2C_LED_ADDRESS 0b1100000
#define I2C_WRITE 0x00

void setup(){
Wire.begin(); // join i2c bus (address optional for master)
delay(10);
}
void loop(){
custom_eyes(1,1);
delay(9999);
}

void custom_eyes(uint8_t color, uint8_t eyeline[10]){
uint8_t index;
// right eye left eye
//1 2 3 4 5 - 25 24 23 22 21
//6 7 8 9 10 - 20 19 18 17 16
//11 12 13 14 15 - 15 14 13 12 11
//16 17 18 19 20 - 10 9 8 7 6
//21 22 23 24 25 - 5 4 3 2 1
Wire.beginTransmission(I2C_LED_ADDRESS << 1 | I2C_WRITE); // transmit to device #4
Wire.write(0x55); // color 55=custom eyes follow
Wire.write(0xAA); // ?? AA=color followed by 10 bytes, each defining one line
// other values cause eyes to light up in multiple colors, needs more work
Wire.write(color&0x1); //color 1-B,2-G,4-R of foreground
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.endTransmission(); // stop transmitting
}

The 4 - 2 column are still blank…

All lit up again
Tried to unplug
All the lights are still on
Picks up camera
The middle lights go blank
:sweat:

Caught the entire board running. :sweat: :sweat: :sweat:

If you turn it back on the LED matrix is off and volume is reset to 100% (30) which is normal volume outside of the house.

Edit -
Since I fixed it…what a terrifying experience lmao
It was dropkick loud.

#define MP3_VOLUME 0x10
#define TX 11
#define RX 4 // ?? was 2 in example I found, but that is unlikely
#include <SoftwareSerial.h>
#include <Wire.h>
#define I2C_LED_ADDRESS 0b1100000
#define I2C_WRITE 0x00

SoftwareSerial mySerial(RX, TX);// RX, TX
void setup() {
// put your setup code here, to run once:
Wire.begin(); // join i2c bus (address optional for master)
delay(10);
mp3Init();
mp3setVolume(10);//0~30
delay(10);
custom_eyes(1,1);
}

void loop() {
for(int i=0;i<15;i++) {
mp3setVolume(10);//0~30
custom_eyes(1,1);
mp3player(i);
delay(30000); //.5 minute
mp3stop();
delay(250);
mp3setVolume(10);//0~30
}
}
void mp3Init()
{
mySerial.begin (9600);
}
void mp3setVolume(byte vol)
{
uint8_t buffer[] = {0x7e, 0xff, 0x06, 0x06, 0x00, 0x00, vol, 0xef};
mySerial.write(buffer, 8);
delay(20);
}
void mp3player(byte data)
{
uint8_t buffer[] = {0x7e, 0xff, 0x06, 0x03, 0x00, 0x00, data, 0xef};
mySerial.write(buffer, 8);
delay(20);
}

void mp3stop()
{
uint8_t buffer[] = {0x7e, 0xff, 0x06, 0x16, 0x00, 0x00, 0x00, 0xef};
mySerial.write(buffer, 8);
}
void custom_eyes(uint8_t color, uint8_t eyeline[10]){
uint8_t index;
// right eye left eye
//1 2 3 4 5 - 25 24 23 22 21
//6 7 8 9 10 - 20 19 18 17 16
//11 12 13 14 15 - 15 14 13 12 11
//16 17 18 19 20 - 10 9 8 7 6
//21 22 23 24 25 - 5 4 3 2 1
Wire.beginTransmission(I2C_LED_ADDRESS << 1 | I2C_WRITE); // transmit to device #4
Wire.write(0x55); // color 55=custom eyes follow
Wire.write(0xAA); // ?? AA=color followed by 10 bytes, each defining one line
// other values cause eyes to light up in multiple colors, needs more work
Wire.write(color&0x1); //color 1-B,2-G,4-R of foreground
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.write(eyeline[40]);
Wire.endTransmission(); // stop transmitting
}

I think I fixed most of it…

What are you trying to achieve ?
Is there a problem?
I don’t understand…

The C written for Vortex hasn’t solved problems with the i2c. It’s a very complicated subject since DFr lost support.
I need to find a common sense solution by someone with expertise in i2c.

This topic is for a solution to fixing the 5x5 on Vortex. I’m currently running the submission sketch. However, you will notice the first picture. It is having difficulty running the sketch and lighting the entire grid.

Q: What am I trying to achieve?
A: The final picture is not an adequate solution. However, for the time it took me to capture the image, it was enough time to see the entire grid lit.

Q: Is there a problem?
A: The C library is an open source replacement for the C++ library that DFr released. The C++ library is no longer available. Related - the i2c has major issues.

Super cool that you’re doing stuff like these, but it’s all so out of the blue. :sweat_smile:

Doesn’t it have some software to control these things? Losing support shouldn’t usually mean that everything that has worked before all of a sudden doesn’t. This all seems pretty unstable.

1 Like

DFr dropped the library while in the middle of making it. They only released it to a few engineers who requested it.
Most of them rewrote their own in C.

Vortex was supposed to be a programmable children’s toy. They released an app and kit on the intent of teaching kids to program. The Arduino wasn’t designed to be compatible with iOS(app). While there are many functions that do work, the Vortex had already undergo its design and funding. It was once a very successful Kickstarter by the team who designed it. Now it is an eBay relic of the failed STEM education agenda.
Programming is simply literacy. We’re looking back farther everyday…