LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface neurosky via Arduino

Hey, 

I am working on a project with Neurosky TGAM chip which is interface with arduino to monitor brain signals.i need some help to interface tgam chip to labview via arduino uno

thank you.

 

0 Kudos
Message 1 of 5
(2,393 Views)

@sajithbiomedical wrote:

Hey, 

I am working on a project with Neurosky TGAM chip which is interface with arduino to monitor brain signals.i need some help to interface tgam chip to labview via arduino uno

thank you.

 


I am guessing you wrote the Arduino sketch to communicate with the TGAM chip?

 

So all you need to do is add in the communication part to your sketch to pass data and commands to and from LabVIEW.

 

BTW: The Arduino Uno installs a virtual serial port, so communicating with an Arduino is no different than communicating with any other device or instrument on a serial port using VISA.

 

In fact it's easier because since you are writing the Adruino sketch, you have full control over the serial protocols, command, and data structures the Adruino expects to receive and send. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(2,333 Views)

Thanks for the reply.is there any previous discussions about this topic. can you help me to find them

I have the Arduino code.

 

0 Kudos
Message 3 of 5
(2,309 Views)

I didn't find anything immediately when searching, but you might consider this as a possible alternative (depending, of course, on your circumstances and situation): Neurosky LabVIEW Driver.

 

Alternatively, perhaps if you post your Arduino code, we could make more suggestions about changes to it to make LabVIEW usage simpler, or ways to write LabVIEW code to use it (as needed).


GCentral
0 Kudos
Message 4 of 5
(2,304 Views)

// Copy and Paste the sketch below to your ardunio IDE .

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#include <Brain.h>

#define sclk 4
#define mosi 5
#define cs 6
#define dc 7
#define rst 8


#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#include <Brain.h>

Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);

Brain brain(Serial);

void setup(void) {

tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab

 

tftPrintTest(); //Initial introduction text,
delay(1000);

tft.fillScreen(ST7735_BLACK); // clear screen
tft.setTextColor(ST7735_WHITE);
tft.setTextSize(1);
tft.setCursor(30,0);
tft.println("EEG Monitor");

Serial.begin(9600);
}
void loop() {

if (brain.update()) {
if (brain.readSignalQuality() > 100) {
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0,30);
tft.setTextColor(ST7735_RED,ST7735_BLACK);
tft.println("signal quality low");
}

else {
tft.setCursor(30,0);
tft.println("EEG Monitor");
tft.drawLine(0, 20, tft.width()-1, 20, ST7735_WHITE);
tft.drawLine(0, 130, tft.width()-1, 130, ST7735_WHITE);

tft.setCursor(0, 30);
tft.setTextColor(ST7735_YELLOW,ST7735_BLACK);
tft.print("signal quality :");
tft.print(brain.readSignalQuality());
tft.println(" ");
tft.setTextColor(ST7735_RED,ST7735_BLACK);
tft.print("Attention :");
tft.print(brain.readAttention());
tft.println(" ");
tft.setTextColor(ST7735_WHITE,ST7735_BLACK);
tft.print("Meditation :");
tft.print(brain.readMeditation());
tft.println(" ");
tft.setTextColor(ST7735_GREEN,ST7735_BLACK);
tft.print("Delta : ");
tft.print(brain.readDelta());
tft.println(" ");
tft.print("Theta : ");
tft.print(brain.readTheta());
tft.println(" ");
tft.print("Low Alpha : ");
tft.print(brain.readLowAlpha());
tft.println(" ");
tft.print("High Alpha : ");
tft.print(brain.readHighAlpha());
tft.println(" ");
tft.print("Low Beta : ");
tft.print(brain.readLowBeta());
tft.println(" ");
tft.print("High Beta : ");
tft.println(brain.readHighBeta());
tft.print("Low Gamma : ");
tft.print(brain.readLowGamma());
tft.println(" ");
tft.print("Mid Gamma : ");
tft.print(brain.readMidGamma());
tft.println(" ");
}}

}
void tftPrintTest() {
tft.setTextWrap(false);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 10);
tft.setTextColor(ST7735_WHITE);
tft.setTextSize(1);
tft.println("Poratble Eplilepsy Monitor");
delay(500);
tft.setCursor(40, 60);
tft.setTextColor(ST7735_RED);
tft.setTextSize(2);
tft.println("EEG");
tft.setTextColor(ST7735_YELLOW);
tft.setCursor(20, 80);
tft.println("Monitor");
tft.setTextColor(ST7735_BLUE);
delay(50);
}

0 Kudos
Message 5 of 5
(2,295 Views)