Skip to content

Commit

Permalink
update LinxLibrary to the new Library system
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleRoets committed Jan 3, 2018
1 parent c353c72 commit d0ec44c
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/****************************************************************************************
/****************************************************************************************
** This is example LINX firmware for use with the Dwenguino with the serial
** interface enabled.
**
Expand Down Expand Up @@ -74,11 +74,11 @@ int readPullup(unsigned char numPins, unsigned char* pins, unsigned char* numRes

//Read From Next Pin
unsigned char pinNumber = pins[i];
pinMode(pinNumber, INPUT_PULLUP); //Set Pin As Input Pull up
retVal = retVal | (digitalRead(pinNumber) << bitOffset); //Read Pin And Insert Value Into retVal
pinMode(pinNumber, INPUT_PULLUP); //Set Pin As Input Pull up
retVal = retVal | (digitalRead(pinNumber) << bitOffset); //Read Pin And Insert Value Into retVal
}

//Store Last Byte
//Store Last Byte
values[byteOffset] = retVal;

//Set number of send bytes
Expand All @@ -91,7 +91,7 @@ int writeLCD(unsigned char numInputBytes, unsigned char* input, unsigned char* n
input[numInputBytes] = 0x00; // add string termination char
String str((char*)input); // convert ascii array to string object

pinMode(LCD_RS, OUTPUT); // make sure command pins are output
pinMode(LCD_RS, OUTPUT); // make sure command pins are output
pinMode(LCD_RW, OUTPUT);
pinMode(LCD_E, OUTPUT);
dwenguinoLCD.clear(); // clear lcd
Expand All @@ -111,7 +111,7 @@ int writeLCD(unsigned char numInputBytes, unsigned char* input, unsigned char* n
dwenguinoLCD.print(str.substring(pos, pos2));
}

  *numResponseBytes = 0; // don't send a response
   
  return L_OK;
*numResponseBytes = 0; // don't send a response
return L_OK;
}
32 changes: 32 additions & 0 deletions dwenguino/Dwenguino/libraries/LinxDwenguino/keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###################################
# Syntax Coloring Map For LinxDwenguino
###################################

###################################
# Datatypes (KEYWORD1)
###################################
LinxDwenguino KEYWORD1
LinxSerialListener KEYWORD1

###################################
# Methods and Functions (KEYWORD2)
###################################
Start KEYWORD2
Listen KEYWORD2
Available KEYWORD2
Accept KEYWORD2
Connected KEYWORD2
Close KEYWORD2
Exit KEYWORD2

AttachCustomCommand KEYWORD2
CheckForCommands KEYWORD2

#######################################
# Instances (KEYWORD2)
#######################################
LinxSerialConnection KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=LinxDwenguino
version=2.0.0
author=Jelle Roets <jelle@dwengo.org>, Sam Kristoff
maintainer=Dwengo <developers@dwengo.org>
sentence=This library provides an interface to control and use the Dwenguino 2.0 as data acquisition board from Labview.
paragraph=With this library Labview can communicate and control all Dwenguino functionality, this includes all analog and digital gpio ports, LCD screen, on board LEDS, buttons, buzzer, servo and DC motors.<br /> It is based on the Linx framework Written By Sam Kristoff (www.labviewmakerhub.com) but modified for the Dwenguino board by Jelle Roets (www.dwengo.org).
category=Device Control
url=http://www.dwengo.org/tutorials/dwenguino/LabviewInterface
architectures=avr
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <stdlib.h>
#include <string.h>

#include "utility\LinxDevice.h"
#include "utility/LinxDevice.h"

#include "utility\LinxListener.h"
#include "utility/LinxListener.h"
#include "LinxSerialListener.h"

/****************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
/****************************************************************************************
** Includes
****************************************************************************************/
#include "utility\LinxListener.h"
#include "utility\LinxDevice.h"
#include "utility/LinxListener.h"
#include "utility/LinxDevice.h"


/****************************************************************************************
Expand Down

0 comments on commit d0ec44c

Please sign in to comment.