Show Posts
Pages: [1] 2 3 ... 14
1  Using Arduino / Networking, Protocols, and Devices / nRF24L01.h library with multiple nodes possible? on: Today at 06:11:25 am
The Arduino Playground nRF24L01.h library at is very easy to use and for me it's working great. I'm using it to transmit the temperature of one device to a receiver.
I have made up a few more temperature sensor transmitters a would like to view all three on the one receiver's display. I'm not sure if there is an easy way to do it with this library. I've seen other libraries but they are very complex compared to this one.
A piece of my receiver code is something like this.

  reset_display();           // Clear logo and load saved mode
  Mirf.spi = &MirfHardwareSpi;
  Mirf.setRADDR((byte *)"serv1");
  Mirf.payload = sizeof(temp);
void loop()
  int x=9;
  Mirf.getData((byte *) &temp);  //byte
  //print menu header
  display.setCursor(8,35);  //over,up

2  Using Arduino / Microcontrollers / Re: Arduino standalone problem on: August 19, 2014, 01:20:26 pm
Agreed. We need your full schematic to figure out what's going on.
3  Using Arduino / Displays / Re: Best approach for 128x64 OLED graphical battery level indicator on: August 14, 2014, 11:53:01 am
I would use the same tiny battery icon as your phone does. Just create the five different battery levels and display one based on your battery voltage. The guy in this video looks like he did the same:

4  Using Arduino / Microcontrollers / Re: 328P and NRF24L01+ not running off a coin cell on: August 14, 2014, 06:11:04 am
Disabling brownout by changing the Extended Fuse from 0x05 to 0x07 has fixed the problem. I just checked this morning and it has been running all night on a 3V coin cell without an issue.  Adding a larger cap as close the the NRF24L01+ power pins will be an eventual mod but right now it's ok.

Thanks to all for the help,
5  Using Arduino / Microcontrollers / 328P and NRF24L01+ not running off a coin cell on: August 13, 2014, 11:00:47 am
I have a simple circuit that consists of a 328P, TMP102 and an NRF24L01+ that I would like to have running off a CR2032 coin cell. Right now in low power mode it rests at 23uA and bursts up on occasional transmit. It runs fine when a larger, rechargeable LiPO battery powers it but nothing when the 3V coin cell is powering it.
I've used the IDE to put the Arduino Pro or Pro Mini (3.3V, 8Mhz) w/Atmega328 bootloader into it so maybe the Brownout fuse needs to be changed. My preferred method to install the bootloader and upload code is using the IDE and USBTinyISP.

6  Using Arduino / Programming Questions / Re: NRF24L01+ , temp sensor and 328P not so low power on: August 13, 2014, 06:14:39 am
Hey Jiggy-Ninja,
Just letting you know that LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); brought the current draw from 2mA  down to 28uA. Awesome and thanks a million!
A quick video of the hardware so far.

7  Using Arduino / Programming Questions / Re: NRF24L01+ , temp sensor and 328P not so low power on: August 12, 2014, 01:59:44 pm
I forgot to mention that the temperature is properly being transmitted to the receiver. Every eight seconds the receiving module displays the transmitters temperature on a small display.

Tonight I'll try LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
 instead of

8  Using Arduino / Programming Questions / NRF24L01+ , temp sensor and 328P not so low power on: August 12, 2014, 12:51:38 pm

I've created a coin cell powered 328P that reads the room temperature from an i2c temperature sensor and transmits the reading using the NRF24L01+. The current consumption now is steady around 2mA and i'd like to get it a lower. My programming skills are weak so any help would be appreciated.

- the 328P is programmed with the default Arduino Pro or Pro Mini (3.3V, 8Mhz) w/Atmega328 bootloader.
- the data sheet for the TMP102AIDRLT says that it draws very little power
- i'm using the Low Power Library from 

Below is the Code and Schematic


// Low Power Library 
// Nrf24L01 connected to Mega 2560
// Nrf24L01 connection details
// Transmit analog value from pin A0 to the receiver
#include "LowPower.h"
#include <SPI.h>
#include <Wire.h> 
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

//Temp Stuff
//int TMP75_Address = 0x49;
int tmp102Address = 0x49;
int numOfBytes = 2;

float rate=12.3;

void setup(){
  Mirf.spi = &MirfHardwareSpi;
  Mirf.setRADDR((byte *)"clie1");
  Mirf.payload = sizeof(rate);
    // Initialize TMP75
  //Wire.beginTransmission(TMP75_Address);       // Address the TMP75 sensor
  //Wire.write(0x01);                       // Address the Configuration register
  //Wire.write(B01100000);                         // Set the temperature resolution
  //Wire.endTransmission();                      // Stop transmitting
  //Wire.beginTransmission(TMP75_Address);       // Address the TMP75 sensor
  //Wire.write(0x00);                          // Address the Temperature register
  //Wire.endTransmission();                      // Stop transmitting
void loop()
    // ATmega328P, ATmega168
                SPI_OFF, USART0_OFF, TWI_OFF);

  //rate = analogRead(A0);
  float tempx = readTemp();
  Mirf.setTADDR((byte *)"serv1");
  //Mirf.send((byte *) &rate);
  Mirf.send((byte *) &tempx);

// Read temperature
float readTemp()
  // Now take a Temerature Reading
  //Wire.requestFrom(TMP75_Address,2);  // Address the TMP75 and set number of bytes to receive
  //byte MostSigByte =;              // Read the first byte this is the MSB
  //byte LeastSigByte =;             // Now Read the second byte this is the LSB

  // Being a 12 bit integer use 2's compliment for negative temperature values
  //int TempSum = (((MostSigByte << 8) | LeastSigByte) >> 4);
  // From Datasheet the TMP75 has a quantisation value of 0.0625 degreesC per bit
  //float temp = (TempSum*0.0625);
  //return temp; 
  // Return the temperature value

  byte MSB =;
  byte LSB =;

  //it's a 12bit int, using two's compliment for negative
  int TemperatureSum = ((MSB << 8) | LSB) >> 4;

  float celsius = TemperatureSum*0.0625;
  return celsius;

9  Community / Exhibition / Gallery / Re: Tiny custom Leonardo design on: August 08, 2014, 08:19:19 am
The 32U4 Board has gone through several revisions since this original post. The switching power supply has been changed to a simple LDO, a few more sensors and a microSD card holder have been added. The latest designs is at:
10  Using Arduino / Displays / Re: SSD1306 128x64 to 64x48 size Oled Display on: July 22, 2014, 02:00:05 pm
I have simple working test code (attached) for the 128X64 that I'm hoping to modify for the smaller display. Do you have experience with the SSD1306? It looks like the colomn, row values will have to be adjusted. Right now on the smaller display it works but the first few and last characters cut off. 

11  Using Arduino / Displays / Re: SSD1306 128x64 to 64x48 size Oled Display on: July 22, 2014, 11:31:10 am
After looking into it, I see there is a whole lot more to it then just tweaking a line or two in the init file.
12  Using Arduino / Displays / SSD1306 128x64 to 64x48 size Oled Display on: July 21, 2014, 07:33:21 am
I've been using the 128x64 oled display that uses the SSD1306 driver and I'd like to try a smaller sized 64X48 one. It looks like defining the smaller size is in the initialization. It might be the line sendcommand(0x2F); //--1/48 duty    //was sendcommand(0x3F) for 128X64 sized display but I have to test.

If anyone is using a 64x48 sized display and can help then please let me know.

This is my 128x64 init only code:

static void init_OLED(void)
  sendcommand(0xae); //display off
  sendcommand(0xa6);            //Set Normal Display (default)
    // Adafruit Init sequence for 128x64 OLED module
    sendcommand(0xAE);             //DISPLAYOFF
    sendcommand(0xD5);            //SETDISPLAYCLOCKDIV
    sendcommand(0x80);            // the suggested ratio 0x80
    sendcommand(0xA8);            //SSD1306_SETMULTIPLEX
    sendcommand(0x2F); //--1/48 duty    //was sendcommand(0x3F) for 128X64
    sendcommand(0xD3);            //SETDISPLAYOFFSET
    sendcommand(0x0);             //no offset
    sendcommand(0x40 | 0x0);      //SETSTARTLINE
    sendcommand(0x8D);            //CHARGEPUMP
    sendcommand(0x20);             //MEMORYMODE
    sendcommand(0x00);             //0x0 act like ks0108
    sendcommand(0xA0 | 0x1);      //SEGREMAP   //Rotate screen 180 deg
    sendcommand(0xC8);            //COMSCANDEC  Rotate screen 180 Deg
    sendcommand(0xDA);            //0xDA
    sendcommand(0x12);           //COMSCANDEC
    sendcommand(0x81);           //SETCONTRAS
    sendcommand(0xCF);           //
    sendcommand(0xd9);          //SETPRECHARGE
    sendcommand(0xDB);        //SETVCOMDETECT               
    sendcommand(0xA4);        //DISPLAYALLON_RESUME       
    sendcommand(0xA6);        //NORMALDISPLAY             

  sendcommand(0x2e);            // stop scroll
  //----------------------------REVERSE comments----------------------------//
  //  sendcommand(0xa0); //seg re-map 0->127(default)
  //  sendcommand(0xa1); //seg re-map 127->0
  //  sendcommand(0xc8);
  //  delay(1000);
  //----------------------------REVERSE comments----------------------------//
  // sendcommand(0xa7);  //Set Inverse Display 
  // sendcommand(0xae); //display off
  sendcommand(0x20);            //Set Memory Addressing Mode
  sendcommand(0x00);            //Set Memory Addressing Mode ab Horizontal addressing mode
  //  sendcommand(0x02);         // Set Memory Addressing Mode ab Page addressing mode(RESET) 
  for(int i=0;i<128*8;i++)     // show 128* 64 Logo
  sendcommand(0xaf); //display on

13  Using Arduino / Displays / Re: Tiny size displays (any) on: July 07, 2014, 06:17:56 am
That little 0.5" display is so tiny. Didn't know they made them that small.
14  Using Arduino / Displays / Re: U8glib and SSD1306 I2C on: April 22, 2014, 06:26:14 am
Have you tried another library to rule out a hardware issue? I have different code that is working on that display.
15  Using Arduino / Displays / Color Oled Display animation files on: April 08, 2014, 07:37:07 am
Freetronics sells a nice 128x128 color oled display with a fire animation:
The animation is on the microSD card in a directory as a series of .bmp files. I believe the Arduino just quickly dumps each .bmp file onto the screen. Does anyone know of software that creates the animation files? I'd like to create my own simple animation.
Pages: [1] 2 3 ... 14