Show Posts
Pages: [1] 2 3 ... 18
1  Products / Arduino Due / Re: Serial Monitor not working on Due? on: July 04, 2014, 09:01:46 am
I have DigiX.

But DigiX can work in Due mode. The difference is only when one is using peripherals built into DigiX, like SD card or WiFi. They behave the same regarding Serial Monitor.
2  Using Arduino / Displays / Re: Digol 1.8" 160x128 OLED SPI examples not working. on: July 04, 2014, 04:59:21 am
Yep, now it worked. thanks.

For anybody who encounters this problem in future:

  - Don't do commenting out. Commenting out is misleading, it will just cause compiling errors.
  - yes, if you want to use SPI, than replace:
        #define _Digole_Serial_UART_
    with:
        #define _Digole_Serial_SPI_
3  Using Arduino / Displays / Digol 1.8" 160x128 OLED SPI examples not working. on: July 03, 2014, 03:22:02 pm
I got the above OLED and installed libraries correctly. But when I try to run code it always tells me that it can't create this or that etc. As well, libraries can't be programmed with use of objects, like other Arduino libraries.

I commented out some lines of code according to the inline istructions and that cuases compilation to fail. I am using SPI and I soldered SPI jumper on the back. When connected display shows: "SPI:SS enable V2.6" so I guess hardware is confirming it is OK. I am running MEGA2560 and using pins 50,52,53 as described in the code. Is there any way to learn how to write code for these displays in a step by step fashion?

Here it is >> Code crashes with: "redefinition of 'DigleSerialDisp mydisp'

Code:
//--- THIS TOOL ONLY FOR DIGOLE SERIAL COLOR OLED MODULE!

/* Design welcome screen and Micro Commands for Digole Serial Color OLED
* This module use different way to show welcome screen, other than previouse module which only display bitmap,
* this module can use any internal commands designed for it when display welcome screen. The size of welcome
* screen still only have 1920 bytes, we used this technical to do this, the data structure of welcome screen is:
* first 2 bytes are the rest of data in welcome screen, as integer, 1st is low byte, 2nd is high byte
* the rest of data are welcome screen commands, so the total size of welcome screen is: size in bytes of commands+2
* We have some tools to help you design welcome screen and Micro Commands set, the steps are:
* 1) design characters which you want to display, you can send the color, font size, display position
* 2) if you want to draw circle, rectangle, pie, lines, please add the correspond commands
* 3) if you want to display picture, please use our picture to C data tool to convert your picture data:
*    www.digole.com/tools/PicturetoC_Hex_converter.php
* 4) add corresponds display picture command and add picture data follow by the commands, there are 3 commands for this module:
*    "DIM", "EDIM1", "EDIM3", for more detail of these commands, please refer to program manual
* 5) put all commands and data together, then use www.digole.com/tools/Convert_C_Format_String_to_Array.php tool to convert the
*    data to array, WHY? because Arduino can't accept long string variable, but accept long array
* 6) put the converted array data in wel[] variable, then run this program, this program will display your welcome screen first,
*    then downloading it to the Flash memory in module, SUGGESTION: just download finished welcome screen, so, on testing period,
*    please comment all downloading routing.
*  After you downloaded the welcome screen or micro commands set, you don't need to do it in the program of production, it will save
*  lot of memory space in the production's software.
*
*  SAMPLE: digole's welcome screen commands set:
*   "CLSF\x78 SC\xf1 ETP\x22\x29 TTWelcome\x0d SF\x0a SC\x13 TRT TRT ETP\x08\x3fTTDigole Digital Solutions\x0dSC\x1f SF\x01 TRT
TTYou will find it's so easy to use and fun:\x0dSC\xE0TTwww.Digole.com\rEDIM1\x00\x10\x1e\x1e....(logo data)", which converted to array bellow
*/
#define _Digole_Serial_UART_  //To tell compiler compile the special communication only,
//all available are:_Digole_Serial_UART_, _Digole_Serial_I2C_ and _Digole_Serial_SPI_
#include <DigoleSerial.h>
//--------UART setup, if you don't use UART, use // to comment following line
//#if defined(_Digole_Serial_UART_)
DigoleSerialDisp mydisp(&Serial, 9600); //UART:Arduino UNO: Pin 1(TX)on arduino to RX on module
#endif
//--------I2C setup, if you don't use I2C, use // to comment following 2 lines
//#if defined(_Digole_Serial_I2C_)
//#include <Wire.h>
DigoleSerialDisp mydisp(&Wire,'\x27');  //I2C:Arduino UNO: SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5 on UNO and Duemilanove
#endif
//--------SPI setup, if you don't use SPI, use // to comment following line
#if defined(_Digole_Serial_SPI_)
DigoleSerialDisp mydisp(50,52,53);  //SPI:Pin 50: data, 52:clock, 53: SS, you can assign 255 to SS, and hard ground SS pin on module
#endif

prog_uchar wel[] PROGMEM ={
40,4,
67,76,13,10,69,68,73,77,49,0,16,30,30,0,0,0,0,0,0,0,0,217,180,181,0,0,0,74,2,75,75,147,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,
181,217,181,181,0,0,74,38,2,1,1,41,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,254,254,177,145,0,0,74,2,111,147,73,5,1,1,110,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,218,181,217,181,145,0,0,74,38,0,0,0,0,78,37,1,74,0,0,0,0,0,0,0,0,0,0,183,146,0,0,145,145,104,0,0,0,74,38,0,0,
0,0,0,0,74,1,37,183,0,0,0,0,0,0,0,183,73,0,0,0,0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,110,37,37,0,0,0,0,0,0,0,74,1,110,0,0,
0,0,0,0,0,0,74,74,0,0,0,0,0,0,0,0,110,1,37,0,0,0,0,0,110,1,110,0,0,0,0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,0,0,74,1,110,
0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,74,70,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,110,37,110,0,0,0,0,0,0,0,0,0,0,74,70,0,0,
0,0,0,0,0,0,0,0,110,1,110,0,0,74,1,0,0,0,0,0,0,0,0,0,0,0,74,69,0,0,0,0,0,0,0,0,0,0,0,37,37,0,111,37,74,0,0,0,0,0,
0,0,0,0,0,0,74,69,0,0,0,0,0,0,0,0,0,0,0,73,1,0,42,6,110,0,0,0,0,0,0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,0,0,0,0,146,
1,74,38,2,147,0,0,0,0,0,0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,0,0,0,147,37,37,6,6,151,0,0,0,0,0,0,0,0,0,0,0,74,38,0,0,
0,0,0,0,0,0,0,0,0,147,5,6,39,2,147,0,0,0,0,0,0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,0,0,0,147,1,38,38,38,115,0,0,0,0,0,
0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,0,0,0,147,1,37,75,1,147,0,0,0,0,0,0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,0,0,0,147,
37,37,111,1,74,0,0,0,0,0,0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,0,0,0,73,1,0,0,37,1,0,0,0,0,0,0,0,0,0,0,0,74,37,0,0,
0,0,0,0,0,0,0,0,0,73,37,0,0,110,37,110,0,0,0,0,0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,0,0,0,110,37,110,0,0,0,1,37,0,0,0,0,
0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,110,1,74,0,0,0,0,0,0,0,0,0,74,37,0,0,0,0,0,0,0,0,0,110,33,110,
0,0,0,0,0,69,0,110,0,0,0,0,0,0,0,0,74,38,0,0,0,0,0,0,0,0,142,33,73,0,0,0,0,0,0,0,37,0,146,0,0,0,0,0,0,0,74,38,0,0,
0,0,0,0,0,146,32,37,0,0,0,0,0,0,0,0,0,33,0,110,0,0,0,0,0,0,74,70,0,0,0,117,81,154,0,0,73,179,0,0,0,0,0,0,0,0,0,0,73,0,
69,74,0,0,0,0,70,38,0,0,149,153,121,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,142,37,37,37,73,146,147,74,74,0,0,149,121,121,48,4,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,110,37,1,33,1,70,37,0,0,117,85,84,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,74,38,1,74,0,0,
4,12,12,117,0,0,0,0,0,0,0,0,13,10,83,70,120,32,83,67,241,32,69,84,80,34,41,32,84,84,87,101,108,99,111,109,101,13,32,83,70,10,32,83,67,19,32,84,82,84,
32,84,82,84,32,69,84,80,8,63,84,84,68,105,103,111,108,101,32,68,105,103,105,116,97,108,32,83,111,108,117,116,105,111,110,115,13,83,67,31,32,83,70,1,32,84,82,84,84,84,
89,111,117,32,119,105,108,108,32,102,105,110,100,32,105,116,39,115,32,115,111,32,101,97,115,121,32,116,111,32,117,115,101,32,97,110,100,32,102,117,110,58,13,83,67,224,84,84,119,119,
119,46,68,105,103,111,108,101,46,99,111,109,13};

#define _DOWNLOAD_MICRO_COMMANDS_ 0;  //1:download welcome screen, 2:download micro commands set

void setup() {
  mydisp.begin();
  mydisp.clearScreen(); //CLear screen
    for (int j = 0; j < sizeof(wel);j++) {
         mydisp.write(pgm_read_byte_near(wel+j));  
    }


         mydisp.write(0);
         mydisp.write(0);
  delay(2000);
#if defined(_DOWNLOAD_WELCOME_)
  //--- start downloading welcome screen to module, comment when testing
  mydisp.uploadStartScreen(sizeof(wel),wel);
  //end downloading
#endif
#if defined(_DOWNLOAD_MICRO_COMMANDS_)
  //--- start downloading welcome screen to module, comment when testing
  mydisp.uploadStartScreen(sizeof(wel),wel);
  //end downloading
#endif
}
void loop() {
}

4  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 30, 2014, 01:57:24 am
Windows 7, 64-bit.

I just found this, from some driver related file:

However the included ArduinoDue.inf in the drivers folder is showing:
[DeviceList]
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_003E&MI_00
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_003E&MI_00

Can fidling with this help? I am sure there is some switch somewhere in installation or libraries that needs to be changed.
5  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 02:14:57 pm
Yes, I tried 1.5.6-r2.

But I am sure that something is wrong with PC. Problem is how to eliminate what is wrong. I've done enough insalling and reinstalling to know that that doesn't change anything.

Question is where else to look?
6  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 01:57:47 pm
- I removed Due from device manager and deleted all the related drivers. Than reinstalled 1.5.5-r2
- changed USB cable,
- tried pressing Reset just before uploading started.
- established that sketch works, by writing to SD Card, it only doesn't show anything on S.M.
- changed baud speed from 9600 to much lower,
- disconnected and disabled all the USB and serial port device, by both pulling cables out and disabling

The strangest thing is that it works on one PC and doesn't on another.
7  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 01:04:25 pm
Which one? One where S.M. doesn't work or one where S.M. works?
8  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 12:37:16 pm
Any fresh ideas? I am still stuck.
9  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 06:42:25 am
There is possibility that cable is the problem. I got my cable from Adafruit and it works well on Leonardo (and on the other PC).

This cable is not just normal mini-USB Type B. Normal Type-B cables can't fit into Leonardo or Due?
10  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 29, 2014, 02:19:40 am
This is how my Due drivers look like. Can somebody please compare with his and tell me if there is any difference?

http://i78.photobucket.com/albums/j111/COROVICD/DP08_Due-Driver_1_zps0dcd9b12.jpg
11  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 28, 2014, 03:03:03 pm
yeah, thx, I was 1.5.5, reinstalling 1.5.6-r2 right now.
12  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 28, 2014, 02:56:43 pm
It detects Due OK, each time.

Problem is it won't print anything to Serial Monitor. I tried:
  - checked that driver is 64-bit on Win7
  - pulled out all other USB devices, so nothing can interfere with Due,
  - puting delay(8000); in front of Serial.begin(9600);
  - dropping the Serial rate to 1200
  - reinstalling the driver
  - same code works on Leonardo
13  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 28, 2014, 02:37:31 pm
@Palliser: Many thanks

That is a standard code from Examples Sketch library. There was never an issue about the code. Code was written by Arduino, Inc. in the first place.

Issue is that Due is emulating emaulation of USB emulation. Which in my case means, I can't get Serial Montior to work.

@zaxarias: Thanks, I don't have access to that PC all the time.

What should I do? Is there something I change on the USB driver?
14  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 28, 2014, 10:14:42 am
Its just AnalogInOutSerial from Examples / Basic / ...  Here it is for a quick reference:

Code:
/*
  Analog input, analog output, serial output

 Reads an analog input pin, maps the result to a range from 0 to 255
 and uses the result to set the pulsewidth modulation (PWM) of an output pin.
 Also prints the results to the serial monitor.

 The circuit:
 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 * LED connected from digital pin 9 to ground

 created 29 Dec. 2008
 modified 9 Apr 2012
 by Tom Igoe

 This example code is in the public domain.

 */

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255);
  // change the analog out value:
  analogWrite(analogOutPin, outputValue);

  // print the results to the serial monitor:
  Serial.print("sensor = " );
  Serial.print(sensorValue);
  Serial.print("\t output = ");
  Serial.println(outputValue);

  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(2);
}
15  Products / Arduino Due / Re: Serial Monitor not working on Due? on: June 28, 2014, 06:58:29 am
Yep, done all the standard stuff, many times. Ehhh, "... mystery wrapped into enigma". PC that doesn't work is about 1-2 years older, but drivers are all up to date.
Pages: [1] 2 3 ... 18