Show Posts
Pages: [1]
1  Using Arduino / Displays / Re: OLED display with 4-wire SPI mode, but without CS on: March 01, 2014, 10:48:46 am
Sounds great.
I would like to not have to alter the SSD1306 device in the library, as I have many SSD1306 devices laying around.
2  Using Arduino / Displays / Re: OLED display with 4-wire SPI mode, but without CS on: February 28, 2014, 06:39:21 am
Hi Oliver,
Any chance you could officially add this device to the library?

- Lars
3  Using Arduino / Programming Questions / Debouncing hall effect sensor readings from a solenoid valve on: February 15, 2014, 03:44:34 pm
Hi

I hope this is posted the right place. Otherwise, please let me know!

I am having trouble using the incoming data from a hall sensor on a solenoid valve. Perhaps it is a question of debouncing, I don't know, I haven't been able to debounce it properly. Instead I have now tried to debug and would like your help to analyse and suggest an approach.

I want to know when the solenoid valve is activated. When the solenoid is not activated (not magnetised), the sensor reading is "1". When the solenoid is activated, I was expecting a constant "0" as when holding a magnet to it, but in reality, I am getting a lot of 0 and 1s during the activated time, when using on a real solenoid.
This is not good, as I am using the 1 and 0 to identify, when and how long the solenoid is activated.
My timer in the original sketch is starting as soon as the the reading is 0 and stopping saving the timing when the reading is once again 1. However, the timer is constantly reset, as the stream of readings is "10101001010" or so.

I made a few sketches to debug and find out what was going on. It turns out, that the readings suggest that the solenoid is less activated than not activated during what I thought was a constant activation.

When activated, a simple read and Serial.println results in:
0 = activated. This whole stream of readings should be all 0s. It would be if the hall effect sensor was reading a magnet, but apparently not a solenoid valve.
Code:
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0

When trying to time it by appending mills():
Code:
1, 11947
1, 11957
1, 11968
1, 11978
1, 11988
0, 11999
1, 12009
0, 12019
1, 12030
0, 12041
1, 12051
0, 12061
1, 12071
0, 12082
1, 12092
0, 12103
1, 12113
1, 12124
1, 12134
1, 12144
1, 12154
1, 12166
1, 12176
1, 12186
1, 12196
1, 12207
1, 12217
1, 12228
1, 12238
1, 12249
0, 12259
1, 12269
0, 12279
1, 12290
0, 12301
1, 12311
0, 12321
1, 12332
0, 12342

I thought maybe using the debounce script would help:
Code:
const int sensorPin = 2;    // the number of the pushbutton pin
int lastSensorState = 1;   // the previous reading from the input pin
int sensorState;             // the current reading from the input pin
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers

void setup() {
  // put your setup code here, to run once:
   pinMode(sensorPin, INPUT);
   Serial.begin(9600);
   Serial.println("Sensor value at start:");
   Serial.println(digitalRead(sensorPin));
}

void loop() {
  // put your main code here, to run repeatedly:
  int reading = digitalRead(sensorPin);

  // If the switch changed, due to noise or pressing:
  if (reading != lastSensorState) {
    // reset the debouncing timer
    lastDebounceTime = millis();
  }
  
   if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:

    // if the button state has changed:
    if (reading != sensorState) {
      sensorState = reading;

      // only toggle the LED if the new button state is HIGH
      if (sensorState == 0) {
        Serial.println("MAGNET!!!!");
      }
      }
      
    }
  
lastSensorState = reading;
}

But that does not result in anything. The expected outcome was the serial monitor showing "MAGNET!!!" when the solenoid valve was activated, but that never happened.

Does anyone have any idea how to approach the reading "01111100111010111001" as identifying the solenoid as activated?
4  Using Arduino / Networking, Protocols, and Devices / Re: Can't send data via NRF24l01 via RF24 library on: January 26, 2014, 07:38:10 am
Ok, so I tried soldering a 1uF 100V (was advised to use this component by the shop) and soldered it on top of the RF module, capacitor "-" to ground on the module and "+" to VCC on the module.

The status message looks ok, but It still says: "Now sending 13530...failed. Failed, response timed out."
5  Using Arduino / Networking, Protocols, and Devices / Re: Can't send data via NRF24l01 via RF24 library on: January 24, 2014, 04:27:00 pm
Hmm... Well, not matter how, the status info looked, it would fail transmitting data.

I will try the capacitor trick, though I only have 100uF, so I will probably have to go get some smaller ones...

Thanks for your tip!!
6  Using Arduino / Networking, Protocols, and Devices / Re: Can't send data via NRF24l01 via RF24 library on: January 23, 2014, 06:03:59 pm
Well,
It seems something is very unstable...
I have two rf modules and an Uno and a Nano.
No matter which combination I use them in, I get varying results.
Even from reset to reset with the same board/module combination.
I tried switching hook-up wires without success...
I am a bit at loss here...

I get al kinds of startup statuses:
Code:
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f0e1 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xf0f0f0f0e1
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
------------------------------------

STATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1 = 0x0000000000 0x0000000000
RX_ADDR_P2-5 = 0x00 0x00 0x00 0x00
TX_ADDR = 0x0000000000
RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA = 0x00
EN_RXADDR = 0x00
RF_CH = 0x00
RF_SETUP = 0x00
CONFIG = 0x00
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01
CRC Length = Disabled
PA Power = PA_MIN
------------------------------------
X_ADDR_P0-1 = 0xe7e7e7e7e7 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
--------------------------
7  Using Arduino / Networking, Protocols, and Devices / Can't send data via NRF24l01 via RF24 library on: January 23, 2014, 03:50:42 pm
Hi
I am trying to get the RF24 library from Maniacbug to work on an Arduino Uno
I am using the example "Getting Started", and I am getting errors when it tries to transmit data.

Anyone have any clue as to what could be wrong. The wiring should be ok, I have checked it several times.

Here is the log from the serial monitor:

Code:
RF24/examples/GettingStarted/

ROLE: Pong back

*** PRESS 'T' to begin transmitting to the other node

STATUS = 0x83 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=1 TX_FULL=1
RX_ADDR_P0-1 = 0x8383838383 0x8383838383
RX_ADDR_P2-5 = 0x83 0x83 0x83 0x83
TX_ADDR = 0x8383838383
RX_PW_P0-6 = 0x83 0x83 0x83 0x83 0x83 0x83
EN_AA = 0x83
EN_RXADDR = 0x83
RF_CH = 0x83
RF_SETUP = 0x83
CONFIG = 0x83
DYNPD/FEATURE = 0x83 0x83
Data Rate = 1MBPS
Model = nRF24L01
CRC Length = Disabled
PA Power = PA_LOW
*** CHANGING TO TRANSMIT ROLE -- PRESS 'R' TO SWITCH BACK

Now sending 12319...failed.

Failed, response timed out.

Now sending 13530...failed.

Failed, response timed out.

Now sending 14739...failed.

Failed, response timed out.

Now sending 15947...failed.

Failed, response timed out.

Now sending 17156...failed.

Failed, response timed out.

Now sending 18365...failed.
8  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: January 22, 2014, 02:25:49 pm
In fact you can mimic the Adafruit setup with U8glib (pin values from your table):
U8GLIB_SSD1306_128X64(10, 9, 12, 11, 13)
Also ensure, that your display is put into serial mode.
Oliver

Thank you!

Actually, I DID try to mimic the Adafruit example without luck - Thanks to your suggestion, I noticed that I had lacked the RESET PIN - which I did not read about in the documentation.
Thank you very much for a fabulous library and your devoted help to people using your library.

- Lars
9  Community / Website and Forum / Re: Tapatalk forum support is possible !!! To forum ADMIN. on: January 12, 2014, 06:46:52 am
I too would very much like to see Tapatalk support.
10  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: January 12, 2014, 03:55:41 am
I have a problem getting a SSD1306 128x64 OLED to work. It does not show anything.
The OLED works flawless using the Adafruit lib.
Using the u8glib and any example sketch, I cannot get it to work and I admit it might a case of identifying the correct pins.

The OLED I am trying to work with is this one:
http://www.ebay.com/itm/SPI-IIC-0-96-128X64-White-GreenLand-OLED-Display-Module-SSD1306-for-Arduino-AVR-/310740698356?pt=LH_DefaultDomain_0&hash=item485996c4f4

In the sketch I have uncommented  "U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);"

In the attached picture I have tried to identify the different pins and functions of the board vs Adafruit lib and U8GLIB.
The connections I am most unsure of is MOSI and A0.



Reading the U8G device documentation an comparing it to Adafruit and OLED documentation it seems as MOSI should be connected from the D1 pin on the OLED to PIN 11 on the arduino boardm and a0 should be connected from the DC PIN on the OLED to PIN 9 on the Arduino board.
However it is not working, and I have tried to identify the pins on the OLED according to the U8GLIB terminology, but nothing works. Even when I sporadically move around the connectors on the OLED smiley-wink

Anyway, I hope someone can shed some light on this.

- Lars
11  Using Arduino / Project Guidance / Re: Dymo LetraTag XR Interfacing w/ Leonardo on: March 12, 2013, 05:39:28 am
Hi
Sorry for bringing up such an old thread, but did you ever succeed in getting it to print?

- Lars
12  Topics / Device Hacking / Re: Dymo label printer on: June 07, 2012, 04:20:46 am
Tak  smiley-wink
But I was in fact looking for a much smaller print head able to print just a line or two on a narrow strip of paper - just like the handheld dymos.
13  Topics / Device Hacking / Re: Dymo label printer on: June 06, 2012, 05:17:24 pm
The aim is to let the Arduino print via the Dymo printhead.
I do not have a Dymo yet, but am looking for a thermal printer smaller than those big black boxes seen on sale on Arduino-sites.
14  Topics / Device Hacking / Dymo label printer on: June 05, 2012, 05:53:46 pm
Anyone managed to hack and use a handheld Dymo label printer with arduino?

15  Using Arduino / Installation & Troubleshooting / New Nano v3 - can't find com port. on: March 14, 2012, 08:35:56 am
I just got an Arduino Nano v3 off of ebay.
However, when connected to my mac, I am not able to choose com port. Only Bluetooth and iPhone com ports are available.
When plugging in my Uno R3, I can choose the com port just fine.

What could be wrong?
Pages: [1]