Show2 as stand alone device

Moderators: odroid, mdrjr

Show2 as stand alone device

Unread postby pjnoxon1 » Tue May 15, 2018 5:58 am

Hi - I haven't worked with Arduino IDE - it seems it has it's own language?

I am investigating using the SHOW2 with some additional hardware as an
analyzer for troubleshooting where I work. There are 3 signals to be looked
at: one is a timing signal, and two are data lines. They are not very fast. I
would like to use the SHOW2 for it's nice little display, and to add my own
software to do the analysis of these 3 signals. I would be designing some
interface for the 3 signals and input them into the ATMega using the 6 pin
connector. First I would time the pulse widths of the timing line, so I would
input that signal to the timer within the ATMega. After analysis if the timing
signal is in good shape, drive the display with "Timing Good" and get into the
remaining analysis. This would involve scanning the two other signals in sync
with the timing signal. The results would be 58 six-bit words that would be
stored in memory and displayed on the SHOW2 in decimal (not binary).

I've done most of my programming in assembly code. I like it because it's
faster to execute on a simple micro. Any ideas about how to do assembly
on the SHOW2?

thanks - PJ
pjnoxon1
 
Posts: 18
Joined: Sun Jun 12, 2016 2:10 am
languages_spoken: english
ODROIDs: U3

Re: Show2 as stand alone device

Unread postby odroid » Tue May 15, 2018 6:29 am

Arduino language is based on C++ and C.
I don't use the Assembly language these days. I used it with Intel's 8051 in '1988~90 only.
Anyway, since Ardiuno IDE supports the inline assembly, you can make an assembly program if you know well the AVR assembly instructions.

BTW, there is a pre-made function in Arduino library to measure the pulse width.
https://www.arduino.cc/reference/en/lan ... o/pulsein/
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon1 » Tue May 15, 2018 7:44 am

Well that sounds promising. Of course if I am going to work on the
nuts and bolts, I could get in the way of the rest of things - like
what memory locations are already taken, what registers can I
use, and the like. Having higher level programming available is
nice for doing some analyzing. Maybe I can get it all done in C++
I took a course on that in 1994, and C, later on Python (2015)...

-pj
pjnoxon1
 
Posts: 18
Joined: Sun Jun 12, 2016 2:10 am
languages_spoken: english
ODROIDs: U3

Re: Show2 as stand alone device

Unread postby pjnoxon » Thu May 31, 2018 8:26 am

Hello,

I want to get working with my (5) Show2 boards, but I don't know how to get started.

I downloaded the Arduino IDE on my Windows 10 laptop. I have the Odroid Wiki and this
forum and have read everything but it hasn't helped me get started. I need to know just
what to do - like after I open the IDE what do I do to load all the software including
libraries, whatever that might be. I look forward to using the schematic diagram and
Atmel manual to access the buttons, leds, PD2/INT0 & PC3-5 pins, and the internal timers.
I need to send stuff to the display but just text-based and not graphics although a choice
of large and small fonts would be nice.

I'm guessing the current ver 2.0 OS on the Show2 is available and that I can modify it -
it should be no trouble for me to read and understand the code, the trouble is how do
I get that code into the Arduino IDE and how do I "compile" it?

How exactly does one move a new OS into the Show2 - using what program and using the USB or the ISP on the Show2?

What is a github and how/why would one use it?

I've never used the Arduino IDE (or any other IDE for that matter). It seems that it will
be an improvement over writing code and using a separate compiler/assembler etc.

thanks - prof James
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby odroid » Thu May 31, 2018 10:35 am

Did you follow this instruction?
https://wiki.odroid.com/accessory/displ ... ow/setting

USB interface should be enough for uploading a compiled sketch.

We've been uploading/maintaining our source code into github.
If you don't have an experience of using github, just download the examples from the github web.
https://github.com/hardkernel/ODROID-SHOW
You can find a green button of "Clone or download".

Yes, Arduino IDE is an integrated development environment to edit and build your code.
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon » Sat Jun 02, 2018 2:53 am

I had downloaded a folder "OdroidShow2Soft" but can you tell me what these are:
libraries folder: Adafruit_BME280, Adafruit_BMP085_Unified, Adafruit_GFX,
Adafruit_IL19340, Adafruit_Sensor, ODROID_Si70xx, ODROID_Si1132, Timer1

Do I have to have any of these to work with the Show2?

In the show_main is show_main.ino - I figure this is the current Show2 OS but
does it need any libraries? Anything else that it needs at all or is it complete?

I figure the weather_board.ino is for the little add-on board Hardkernal sells.
I have one of these and might play with it someday. Does this require any libraries?

thanks - prof James
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby rooted » Sat Jun 02, 2018 4:26 am

pjnoxon wrote:I had downloaded a folder "OdroidShow2Soft" but can you tell me what these are:
libraries folder: Adafruit_BME280, Adafruit_BMP085_Unified, Adafruit_GFX,
Adafruit_IL19340, Adafruit_Sensor, ODROID_Si70xx, ODROID_Si1132, Timer1

Do I have to have any of these to work with the Show2?

In the show_main is show_main.ino - I figure this is the current Show2 OS but
does it need any libraries? Anything else that it needs at all or is it complete?

I figure the weather_board.ino is for the little add-on board Hardkernal sells.
I have one of these and might play with it someday. Does this require any libraries?

thanks - prof James


ODROID_Si1132 is the screen, you need Adafruit_GFX to draw to the screen, I think Timer1 is used for the buttons but would have to look at some source to be sure. The rest are for sensors such as the weatherboard 1 and 2.
User avatar
rooted
 
Posts: 4941
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Show2 as stand alone device

Unread postby pjnoxon » Sat Jun 02, 2018 8:47 am

Oh thanks so much!

One more question, do I need to unpack the folders
so everything is exposed in "libraries" or can the Arduino IDE dig to find things?

- prof James
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Sat Jun 02, 2018 9:00 am

Well, I tried it with just copying the whole OdroidShow2Soft into Arduino:libraries. The includes in the show_main are:
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_ILI9340.h>
#include <Adafruit_GFX.h>
#include "TimerOne.h"

but I got the error:
fatal error: Adafruit_ILI9340.h: No such file or directory

so maybe I need to do some unpacking of the folders?

-pj
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby rooted » Sat Jun 02, 2018 9:06 am

You need to read how to import libraries into the IDE

https://www.arduino.cc/en/Guide/Libraries
User avatar
rooted
 
Posts: 4941
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Show2 as stand alone device

Unread postby pjnoxon » Sat Jun 02, 2018 9:34 am

Yes I tried all of that. The Odroid libraries do not appear in the library manager list of libraries.

In the Odroid WIKI it says this about loading libraries:

"Add Libraries
You need to add the ODROID-SHOW libraries in the IDE through the menu skech → import Library… → Add Library…"

but the current Arduino does not have this, instead it has "Manage Libraries" perhaps in an effort to prevent this?

When I tried adding the https://github.com/hardkernel/ODROID-SHOW as a zip file I get an error message
"not a valid library". Perhaps it is not possible to use current Arduino IDE because of these changes?

- PJ
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby rooted » Sat Jun 02, 2018 9:58 am

I haven't used it in a while so I can't currently be of more help.
User avatar
rooted
 
Posts: 4941
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Show2 as stand alone device

Unread postby odroid » Mon Jun 04, 2018 9:02 am

We tested it the sample codes with Arduino IDE 1.0.5 in Ubuntu.
Which version of Arduino IDE in Windows?
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 3:08 am

I just downloaded it last week, it is 1.8.5 now on Windows 7.
I tried to include Adafruit_CircuitPlayground.h and also Adafruit_Circuit_Playground.h but that didn't help.
I think either the Odroid required libraries will need to be included in Arduino's "Library Manager" or
the zip file currently housed on github will need to be modified to get it to work with the current IDE through
Sketch >> Include Library >> Add .ZIP Library as right now that process leads to the "not a valid library" issue.

- pj
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 3:10 am

Just to verify the Board selector should be "Arduino/Genuino Uno"
as opposed to one of the other selections?
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 3:17 am

When I change from "Arduino/Genuino Uno" to "Adafruit Circuit Playground" I get this error:
Invalid library found in c:\Program Files (x86)\Arduino\libraries\OdroidShow2Soft: c:\Program Files (x86)\Arduion\libraries\OdroidShow2Soft
This is the download from github that I unzipped and put in the libraries folder for the IDE.
On Thursday I am going to the local maker space Ace Monster Toys here in Berkeley for their
Electronics open house to see about making a 3D printed case for my (5) Show2 and battery plus interface board I designed.
I'll bring my Odroid U3 and UPS2 as well, but I hope I can show something more on the Show2 than just the stock OS.
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 3:22 am

It seems the Adafruit Circuit Playground does not have ILI9340 in it either
as it gives the same error: fatal error: Adafruit_ILI9340.h: No such file or directory
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 3:42 am

Well I got it to compile by copying ILI9340, GFX, and TimerOne (both .h and .cpp) into Adafruit Playground
and selecting that board, but it does a lot of complaining about conversion of unsigned int to const int
in something called talkie.cpp:15:73 and 19:73 and 23:57 and 25:57 and 27:57 and 29:57 and 31:57 and 32:57 and 33:57
and 34:57 and 39:62 so these must be locations in the code where some shortcut no longer works correctly perhaps?

It says 16690 bytes (58%) of program store - kinda bloated I would suggest.
Global variables use 1095 bytes of dynamic memory (I don't know how much is available)
and that same warning about Invalid Library = OdroidShow2Soft
but it did compile I guess?
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby odroid » Tue Jun 05, 2018 8:24 am

I've just built two examples successfully on Arduino IDE 1.0.5 without any modification.
weather_board : Binary sketch size is 24,650 bytes.
show_main: Binary sketch size is 13,452 bytes.

Please consider using the same IDE version for initial development setup.
Once everything works, move to a newer version.
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 10:47 am

are you telling me to go get 1.0.5 someplace?
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby phaseshifter » Tue Jun 05, 2018 10:55 am

i just got this don`t know if i got the file version or the program version..but ..i just started to play round recently..with the show since it goes with my u3+

2:1.0.5+dfsg2- all
odroid N-1 16Gb emmc orange..
phaseshifter
 
Posts: 2839
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: N-1..c1+ ..c-2..xu3 lite,xu4...u-3..
u-2...other odroid acc`s as well

Re: Show2 as stand alone device

Unread postby odroid » Tue Jun 05, 2018 12:01 pm

pjnoxon wrote:are you telling me to go get 1.0.5 someplace?

Yes, you can find 1.0.5 for Windows in this link.
https://www.arduino.cc/en/Main/OldSoftwareReleases
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 4:15 pm

It doesn't go exactly as in the setting page but seems to compile.

Now it is not clear how to program the Show2 - the Serial Port menu is grey, not like the setting page.

Which board are we using (right side of image) and which programmer (left side)?
Attachments
Arduino-1-0-5.png
Arduino-1-0-5.png (195.14 KiB) Viewed 331 times
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Tue Jun 05, 2018 4:51 pm

CP2104driver.png
CP2104driver.png (186.02 KiB) Viewed 329 times
Not clear how to proceed with the Serial Port, I haven't had a Windows PC
with a COM port on it for such a long time now. Seems to be driver missing to use USB?
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby tobetter » Tue Jun 05, 2018 6:09 pm

I suppose you must install the driver for sure.
https://www.silabs.com/community/interf ... 210xd-ek07
tobetter
 
Posts: 2193
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Show2 as stand alone device

Unread postby odroid » Tue Jun 05, 2018 6:35 pm

You had to use "Serial Port" menu instead of the "Programmer" menu.
Can you find any COM port in the device manager?

If not, I think you had to install Windows 10 driver for the UART controller in SHOW2.
https://www.silabs.com/products/develop ... cp-drivers
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby AreaScout » Tue Jun 05, 2018 11:35 pm

Install the drivers shipped with Arduino IDE, you can find it in this folder C:\Program Files (x86)\Arduino\drivers

RG
User avatar
AreaScout
 
Posts: 500
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: Show2 as stand alone device

Unread postby pjnoxon » Fri Jun 08, 2018 5:11 am

Yes, the link from Site Admin was downloaded, installed, and now
when Show2 connected to Arduino 1.0.5 it has "Com3" in the Serial Port menu.
Editing the code in the Arduino 1.0.5 works, uploading to Show2 works as well.
Is this the way to work now, using a very old IDE?

thanks for all the help!

- prof James
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Fri Jun 08, 2018 5:21 am

Is there a handy list of the supported VT100 codes from
what, its in the GFX library on the Show2 maybe?
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby pjnoxon » Fri Jun 08, 2018 5:39 am

I found these two documents, I am guessing
that only the esc[ codes will work perhaps?

-pj
Attachments
EK-VT100-RC-001_VT100ProgRefCard.pdf
(798.3 KiB) Downloaded 3 times
ctlseqs.pdf
(63 KiB) Downloaded 3 times
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2

Re: Show2 as stand alone device

Unread postby odroid » Fri Jun 08, 2018 9:31 am

Refer the supported "ESC" codes in this link.
https://wiki.odroid.com/accessory/displ ... g_commands
User avatar
odroid
Site Admin
 
Posts: 27973
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Show2 as stand alone device

Unread postby pjnoxon » Sat Jun 09, 2018 4:24 am

Super awesome
- thanks
pjnoxon
 
Posts: 38
Joined: Wed Sep 10, 2014 6:58 am
Location: Oakland California
languages_spoken: english
ODROIDs: U3, UPS2, Show2


Return to SHOW

Who is online

Users browsing this forum: No registered users and 1 guest