FROM RFM12B to RFM69W 868Mhz

Started by arrinkiiii, January 05, 2014, 07:48:31 PM

Felix

For new comers like you the best place to start is the examples, and the forum as a place to get help.
To answer the other questions ...

1) Not familiar with that particular LCD. Others have posted in the forum about using a smaller SSD1306 OLED display: http://lowpowerlab.com/forum/index.php/topic,119.0.html
There are many other displays that work with Arduino. I would start by googling "Arduino LCD" or "Arduino display". Don't forget Moteino will only provide 3.3V if you power your LCD from the Moteino "3.3" pin.
2) I don't know, looks like the seller did not include any links or much informatio on how to actually use that product.
3) C++. The Arduino "language" is actually a lightly wrapped C++. Or you could try assembly but I would not recommend that :P

arrinkiiii

#16
Thanks Felix  :D  Yes, examples are good but i need to understand a bit more the language and, if im not talking wrong, i  need to understand the structure of C++  I start to read the book C++ for Dummies and plus the examples i think will be a good start  :)

I take your advice and went search for other LCD in Ebay and come across with this  http://www.ebay.com/itm/SPI-1-5-Full-Color-OLED-Module-for-Arduino-AVR-PIC-STM-ARM-PI-/131084066474?pt=LH_DefaultDomain_0&hash=item1e85381eaa  With this specifications i can assume that this OLED works with Moteino because this work with Arduino UNO?

SPI 1.5" Full Color OLED Module for Arduino Uno
Supply:3V3~5V.
Logic:3V3~5V.
Max Colors:262,144 Colors.
Matrix:128(RGB)x128
Interfaces:4-wire SPI

Pins list:
GND       
VCC (3V3~5V)
EN(for HV)
CLK
DIN
DC
CS
REST

Arduino UNO sources code (working in 64K Mode) <------ ?!?!?
Download it from: oled.jimdo.com

It have download the source code but i open and is big and complicated. One question, the pin's from Arduino UNO like...

#define RST_PIN 8
#define CS_PIN  9
#define DC_PIN 10   <------ In Moteino D10 is for the transceiver?
#define DIN_PIN 11
#define CLK_PIN 12
#define HVEN_PIN 13

...are the same in Moteino?

The screen is "just" for tell me what function im doing wend pressing a button (or two). I think the wire connection is not so difficult but the code... Can you direct me or something for i integrate this OLED in the code? Need to read/understand the 3 library's that the source code use...? I think it use 3 library's but because the screen is doing geometric stuff in the example/video. Maybe for show what you are doing wend press a butt could be more easy. Or is better not trying implement the OLED just because is to much for a newbie like me??

Code:
http://pastebin.com/r4W9NgFD

Source code for th OLED:
http://pastebin.com/NUw0uNPj

KanyonKris

I only took a quick look at the library for that OLED display, but I could only see functions for drawings graphics (lines, colors, etc.), I didn't see anything for text. So you'll have to write a LOT of code to draw stuff on that display.

Text displays are lot easier to work with, you just send them a string of characters and it prints them on the screen. Felix used a 2 line LCD display for his Mailbox Notifier project and I think you'd find it much easier to work with, and you'll have Felix's code to see how he made the display work - http://lowpowerlab.com/blog/2013/08/27/mailbox-notifier-project-upgrade/

LazyGlen

Another good place to look for LED/ LCD/ OLED/ Eink Displays and tutorials for connecting them is at AdaFruit. A fairly extensive explanation is here:
http://learn.adafruit.com/character-lcds and they carry several different types. Including a back pack unit that for a little more cash makes programming easier. http://www.adafruit.com/products/292

LG

arrinkiiii


Thanks LazyGlen and KanyonKris, very appreciated for the information.

-Now i understand a litle bit more about library's. If i want put color OLED need to see the library if got functions for text/print... For sure that exist some kind of library that work with text... need to search more =)) 

-2 line LCD for start can be a good choise. Back to the cave to read more =)))





Felix

arrinkiiii,
If it works with UNO it should work with Moteino. Just mind that everything is 3.3V on Moteino.
Having said that the LCD specs look good, you can interface logic and powerd to/from 3.3V Moteino directly.
The D10 is offlimits because it's used by the transceiver (if one is present) so use another digital pin (not D2 - also transceiver, and not D8 if you got a SPIFlash chip present).

arrinkiiii

#21
Hi Felix, thanks for the detail information =))

So... need to have a screen that is power up with 3,3v for i able to connect direct to Moteino. But what i can see is that exist a lot of screens (TFT/LCD/OLED) but not all screens have library's and some screens come only with library's for design and not for text.

This is true? What i want to say is, wend i looking for a screen to Moteino/Arduino is better that have a library that support text?

I think i will go to this OLED  http://www.ebay.com/itm/1-8-Serial-UART-I2C-SPI-True-Color-OLED-160x128-Display-Module-for-Arduino-PIC-/370962965005?pt=LH_DefaultDomain_0&hash=item565f1da20d Got library's, a lot of information and they say can operate from 1 pin to 3 pin's depending what kind of communications you want to use (UART/I2C/SPI). I think for what i see so far this is the most simple and with more information. 



If someone can tell me in short and simple words, what communication (UART/I2C/SPI)  i should use  and why  and the differences between them?

LazyGlen

Given the questions you are asking, it is better that you have screen/ library that supports text. We all have to start somewhere, and I would not want to start with a graphical display myself. (I'm using one of the 16x2 with blueish background shown on page 2 of the link I posted to learn how it works myself.)

I took a brief look at the unit you linked, it looks very nice, and has options. Options can be good or confusing. Download the code and take a good look at it. I think I would use I2C personally, but I already have I2C temp sensors talking with my Moteino's. So I have the I2C library and a little bit of knowledge. SPI code/library is also available if you have a FLASH chip. Look at how the example code works. Chances are, one will make more sense to you than another, that's probably the one you should start with.

LG

arrinkiiii

Hi LG

Thanks for the info, very appreciated =)) My Moteino have chip (didn't want but in Portugal i just have found with the chip) But i think i will go for the I2C communication/protocol. You say that you have the I2C library, this library can be use with any screen that can communicate in IC2 ?  Do you know what communication use less pin's (UART/I2C/SPI)? 

Sorry for so many question, but more i learn more questions i have   :D



LazyGlen

Quote from: arrinkiiii on January 10, 2014, 02:29:38 PM
Hi LG

Thanks for the info, very appreciated =)) My Moteino have chip (didn't want but in Portugal i just have found with the chip) But i think i will go for the I2C communication/protocol. You say that you have the I2C library, this library can be use with any screen that can communicate in IC2 ?  Do you know what communication use less pin's (UART/I2C/SPI)? 

Sorry for so many question, but more i learn more questions i have   :D

My preference is I2C. It is not as fast as SPI for transferring data, but the projects I am doing this is not an issue. The thing I like about I2C is that it includes addressing in the data packets. So you connect power and ground, then SDA (SerialDAta) and SCL (SerialCLock) to any and all (well, up to 127) devices. Once you get the addressing set up, you simply put a request on the bus to write or read information to or from an address, and the device at that address responds.

SPI has the issue (for ME) that every time you add a device, you burn another pin for a chip select. This is why if you have FLASH on your Moteino, D8 is not available, the FLASH chip would get activated when you use it. It seems to me like every time I settle on a pin for something, some shield decides that is the hard wired pin for some random SPI device. (You hear me Ethernet Shield!?) http://www.seeedstudio.com/wiki/Ethernet_Shield_V2.0
QuoteFrom the SeedStudio writeup on their Ethernet Sheild
Notice:
Both W5200 and SD card communicate with Arduino via SPI bus. Pin 10 and pin 4 are chip select pins for W5200 and SD slot. They cannot be used as general I/O.

Think of it like this: You have N friends you want to be able to talk to on the phone. You can either set up a phone system that is fast, but needs a dedicated phone per friend, so you have N phones in your house. If you make a new friend, you add another phone. OR You set up a phone system that isn't quite as fast, but the phone you install has a number pad on it, you assign each friend a number (address). When you want to talk to one of them, you punch the number and the call is routed to that person. To add another friend, you simply assign them an address on the same system.

This is my biased take on it. I found a more well balanced discussion here:http://www.eevblog.com/forum/suggestions/uart-spi-i2c/

If the display that you are looking to buy uses standard I2C, the standard I2C library should talk to it.

LG

arrinkiiii


After read 2 and 3 times, your good documented text, i will go for I2C  =)) Also many thanks for the the link. With your examples and with the link i understand a lot better, thank you.


I will check the I2C library, every time that i learn a bit more i need to read again everything and each time i read again the same words, lines, text's they sound different, they make more sense/meaning.

The screen that i think to buy have a library and exist a few one's on the internet... need to check and see how i can make the code. I know (i think) that the function is print() for output text in the screen. 

http://www.ebay.com/itm/1-8-Serial-UART-I2C-SPI-True-Color-OLED-160x128-Display-Module-for-Arduino-PIC-/370962965005?pt=LH_DefaultDomain_0&hash=item565f1da20d