Multifunction shield for Arduino Uno (HCARDU0085)
Re: Multifunction shield for Arduino Uno (HCARDU0085)
@linker3000: one question from a newbie, if I may
The original DS18B20 code (posted by barewires above) includes a delay between conversion start and data read:
delay(1000); // maybe 750ms is enough, maybe not
However, that delay seems to be missing in your code. Could you explain (again, in terms a newbie could understand ) why it is not necessary?
Thank you!
The original DS18B20 code (posted by barewires above) includes a delay between conversion start and data read:
delay(1000); // maybe 750ms is enough, maybe not
However, that delay seems to be missing in your code. Could you explain (again, in terms a newbie could understand ) why it is not necessary?
Thank you!
-
- Posts: 5
- Joined: Mon Jun 23, 2014 9:26 pm
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Hi Bogd,bogd wrote:@linker3000: one question from a newbie, if I may
The original DS18B20 code (posted by barewires above) includes a delay between conversion start and data read:
delay(1000); // maybe 750ms is enough, maybe not
However, that delay seems to be missing in your code. Could you explain (again, in terms a newbie could understand ) why it is not necessary?
Thank you!
Actually, I grabbed my copy of tne code from elsewhere so it must have been altered by someone else! If the delay is essential for proper conversion I might be getting away with the fact that there's a 250mS delay between samples in my main loop.
Edit: I had a look at the data sheet for the DS18B20 and it states that the chip can take up to 750mS to generate the temperature data when it's operating at its default 12-bit resolution. This is probably why there's the delay you spotted in the example code. To play nice with the chip I have added the delay back in to my example. I have also altered the delay in the main loop to 4 seconds, so, overall, the temperature on the display will update roughly every 5 seconds. Thanks for spotting that.
Edit2: 18-July-2014: I was looking at the code again and realised that due to the 4 x 10mS delays in the LED display interrupt routine, and the fact that it's called around 200 times a second, this was adding up to a significant time pause in its own right so I have modified the delay value in the main loop to account for this and provide an overall display update approx every 10 seconds. Published code has been updated accordingly.
-
- Posts: 2
- Joined: Thu Aug 14, 2014 11:27 am
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Hi,
I am having problems lighting more than on 7 segment at the same time.
I follow the code example given, ported to mbed.org and ST NUCLEO-L152RE, but setting subsequent 7 segment digits clears the previous one so I only ever have one lit up. Or rather, if I OR the segment select masks I can have the last value displayed on more than one segment at a time, but not different values for different segments.
The code I'm using is essentially:
Repeating this with different bSegment and bValue clears the previously set segment.
Any ideas?
I am having problems lighting more than on 7 segment at the same time.
I follow the code example given, ported to mbed.org and ST NUCLEO-L152RE, but setting subsequent 7 segment digits clears the previous one so I only ever have one lit up. Or rather, if I OR the segment select masks I can have the last value displayed on more than one segment at a time, but not different values for different segments.
The code I'm using is essentially:
Code: Select all
_latch = 0;
for (int i=7;i>=0;i--) { // bValue is the digit mask to display
_clock = 0;
_data = (bValue & (1<<i));
_clock = 1;
}
for (int i=7;i>=0;i--) { // bSegment is the segment select mask
_clock = 0;
_data = (bValue & (1<<i));
_clock = 1;
}
_latch = 1;
Any ideas?
Re: Multifunction shield for Arduino Uno (HCARDU0085)
You have to write to each segment in sequence in a continuous loop. Notice in the example sketch the function that writes to all 4 digital is being continuously called by the function WriteNumber(). If you do it fast enough it creates a persistence of vision (POV) effect and they all appear to be on at the same time. Btw in the code you have posted you have bValue instead of bSegment.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 2
- Joined: Thu Aug 14, 2014 11:27 am
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Thanks! I suspected (feared?) as much.andrew wrote:You have to write to each segment in sequence in a continuous loop. Notice in the example sketch the function that writes to all 4 digital is being continuously called by the function WriteNumber(). If you do it fast enough it creates a persistence of vision (POV) effect and they all appear to be on at the same time. Btw in the code you have posted you have bValue instead of bSegment.
No matter, this is only for test and fooling around. I can live with that.
And you're right about the second code segment. Copy/paste error. I didn't paste my actual code just a sketch built from copy/pasting it.
Re: Multifunction shield for Arduino Uno (HCARDU0085)
What about example code for using wireless, bt, or voice recognition module? Anything available for that?
Also, I assume those 12 pins are for servos? Any examples for those? What are jumpers J1 and J2?
Do you sell any of these modules I could use with this board and / or could you point me to some that would work?
Sorry If I am asking too many questions at once. I am kind of new to Arduino. New to the forum to so my apologies if I posted this in the wrong spot.
Thanks!!
Also, I assume those 12 pins are for servos? Any examples for those? What are jumpers J1 and J2?
Do you sell any of these modules I could use with this board and / or could you point me to some that would work?
Sorry If I am asking too many questions at once. I am kind of new to Arduino. New to the forum to so my apologies if I posted this in the wrong spot.
Thanks!!
Re: Multifunction shield for Arduino Uno (HCARDU0085)
That interface is connected directly to the Arduino's hardware serial port and is just arranged in a convenient way for connecting a Bluetooth/APC220/Voice module to it. You can treat it in the same way as the serial port on your Arduino board. For the Bluetooth module, as it is just acts as a dumb serial pass-through device, it doesn't require any code to use it. You can just use any sketch that makes use the hardware serial port and so long as the board rate is correct it should work fine. You can find more information on how theWhat about example code for using wireless, bt, or voice recognition module? Anything available for that?
Bluetooth devices work in this thread:
http://forum.hobbycomponents.com/viewtopic.php?f=74&t=9
That is correct. You can of course use them for other purposes but they are arranged for connecting servo's to them. The 5V power is taken directly from the Arduino's 5V supply.Also, I assume those 12 pins are for servos?
We do sell Bluetooth slave modules that can be used with this port. The link below is to our HC-06 slave module which will pair with Bluetooth master devices such as computers, tablets, and smart phones:Do you sell any of these modules I could use with this board and / or could you point me to some that would work?
http://hobbycomponents.com/index.php/ar ... odule.html
For the voice recognition module, we do currently have a suitable one but it is awaiting evaluation before we can place it on sale.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Andrew - thank you for the information. That makes sense and helps a lot. I will keep my eye open for the voice recognition module.
Thanks again!!
Thanks again!!
"Just call me AND OR NOR. But never NAND."
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Hello
im' french, excuse me for my bad english.
i became last week the module wuth the 4 digits, but when i upolad the sketch in the arduino to display an interger of the digit they can't display the number "5" et the number "6"n the replace it with "9" ant "8" !! can someone help me ????
im' french, excuse me for my bad english.
i became last week the module wuth the 4 digits, but when i upolad the sketch in the arduino to display an interger of the digit they can't display the number "5" et the number "6"n the replace it with "9" ant "8" !! can someone help me ????
Re: Multifunction shield for Arduino Uno (HCARDU0085)
Pull the shield slightly out of the sockets or place some insulation between the USB housing and the PCB of the shield. It may be the display pins shorting out on the USB housing like it did on mine.richard wrote:Hello
im' french, excuse me for my bad english.
i became last week the module wuth the 4 digits, but when i upolad the sketch in the arduino to display an interger of the digit they can't display the number "5" et the number "6"n the replace it with "9" ant "8" !! can someone help me ????