[OpenTRV-dev] OT: replacement of danish char's inside a word

Bo Herrmannsen EMAIL ADDRESS HIDDEN
Wed Mar 19 21:08:27 GMT 2014


ahh

makes sense :-D


Den 19/03/2014 kl. 22.06 skrev Adrian Godwin:

> You can't use 5v with the PNP because the transistor will turn on when the base is more negative than the emitter (more positive for an NPN). If you connect emitter to 5V and drive it with 0 - 3.3 from the Pi, the transistor will see -1.7 to -5 (via the resistor). So it will never turn off, though if the resistor is large it will turn on less strongly when the Pi output is at 3v3.
> 
> 
> On Wed, Mar 19, 2014 at 9:02 PM, Adrian Godwin <EMAIL ADDRESS HIDDEN> wrote:
> On the NPN circuit, the relay is driven from 5V. But your PNP circuit is fine if the top connection is 3v3.
> 
> 
> 
> On Wed, Mar 19, 2014 at 9:01 PM, Adrian Godwin <EMAIL ADDRESS HIDDEN> wrote:
> Yes, fine if it's an electronic buzzer. If it's electromechanical then you need the diode.
> 
> 
> 
> On Wed, Mar 19, 2014 at 8:58 PM, Bo Herrmannsen <EMAIL ADDRESS HIDDEN> wrote:
> been following this pic
> 
> http://3.bp.blogspot.com/_c8EartLqdVs/TNQ-7InWxaI/AAAAAAAAAmo/ICttrtFaPlw/s1600/PNP+Driver.bmp
> 
> replaceing the relay coil with the buzzer and leaving out the diode
> 
> 
> Den 19/03/2014 kl. 20.09 skrev Adrian Godwin:
> 
>> I wouldn't. That buzzer takes 30mA and the pi pins are rated at 16mA.
>> 
>> 
>> 
>> On Wed, Mar 19, 2014 at 6:52 PM, Bo Herrmannsen <EMAIL ADDRESS HIDDEN> wrote:
>> I have seen guides where they attached one direct...
>> 
>> but of course a 3V one is needed... 
>> 
>> http://www.tandyonline.co.uk/miniature-3-3v-pcb-buzzer.html
>> 
>> 
>> 
>> Den 19/03/2014 kl. 19.17 skrev Adrian Godwin:
>> 
>>> A GPIO pin won't drive a buzzer. Needs a transistor at least. 
>>> 
>>> 
>>> On Wed, Mar 19, 2014 at 5:34 PM, Bo Herrmannsen <EMAIL ADDRESS HIDDEN> wrote:
>>> yeah....
>>> 
>>> a buzzer with 2 terminals cant be more simple... one terminal to gnd and one to a GPIO pin... ie pin 15 or GPIO 22
>>> 
>>> 
>>> Den 19/03/2014 kl. 18.30 skrev Stuart Poulton:
>>> 
>>>> I going with the keep it simple approach.
>>>> 
>>>> On 19 Mar 2014 17:25, "Bo Herrmannsen" <EMAIL ADDRESS HIDDEN> wrote:
>>>> to big.... it will not fit... its the buzzer only i need
>>>> 
>>>> 
>>>> Den 19/03/2014 kl. 17.50 skrev Stuart Poulton:
>>>> 
>>>>> How about this
>>>>> 
>>>>> http://shop.pimoroni.com/products/pibrella
>>>>> 
>>>>> On 19 Mar 2014 14:32, "Bo Herrmannsen" <EMAIL ADDRESS HIDDEN> wrote:
>>>>> Figured it....
>>>>> 
>>>>> Now where do i find a buzzer for 3.3V that does not overload the Ras Pi's GPIO pins?
>>>>> 
>>>>> 
>>>>> 
>>>>> Den 18/03/2014 kl. 14.14 skrev Bo Herrmannsen:
>>>>> 
>>>>> > Hi
>>>>> >
>>>>> > anyone that can help me out with php?
>>>>> >
>>>>> >
>>>>> > i need to replace some special danish char's with something else. This should happen no matter where they pop up.
>>>>> >
>>>>> >
>>>>> > $string = $row['delivery_street_address'];
>>>>> >
>>>>> > $patterns = array();
>>>>> > $patterns[0] = '*å*';
>>>>> > $patterns[1] = '*æ*';
>>>>> > $patterns[2] = '*ø*';
>>>>> >
>>>>> >
>>>>> > $replacements = array();
>>>>> > $replacements[3] = '/x7D';
>>>>> > $replacements[2] = 'X';
>>>>> > $replacements[1] = '/x7C';
>>>>> >
>>>>> > echo preg_replace($patterns, $replacements, $string);
>>>>> >
>>>>> >
>>>>> >
>>>>> > the address in this case is: Sandkæret 1,1,1
>>>>> >
>>>>> > but these 3 letters can pop up anywhere in any numbers
>>>>> >
>>>>> > all help is welcome :-D
>>>>> >
>>>>> >
>>>>> 
>>>>> _______________________________________________
>>>>> OpenTRV-dev mailing list
>>>>> EMAIL ADDRESS HIDDEN
>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>> _______________________________________________
>>>>> OpenTRV-dev mailing list
>>>>> EMAIL ADDRESS HIDDEN
>>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>> 
>>>> 
>>>> _______________________________________________
>>>> OpenTRV-dev mailing list
>>>> EMAIL ADDRESS HIDDEN
>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>> 
>>>> _______________________________________________
>>>> OpenTRV-dev mailing list
>>>> EMAIL ADDRESS HIDDEN
>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>> 
>>> 
>>> _______________________________________________
>>> OpenTRV-dev mailing list
>>> EMAIL ADDRESS HIDDEN
>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>> 
>>> 
>>> _______________________________________________
>>> OpenTRV-dev mailing list
>>> EMAIL ADDRESS HIDDEN
>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>> 
>> 
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>> 
>> 
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> 
> 
> _______________________________________________
> OpenTRV-dev mailing list
> EMAIL ADDRESS HIDDEN
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> 
> 
> 
> 
> _______________________________________________
> OpenTRV-dev mailing list
> EMAIL ADDRESS HIDDEN
> http://lists.opentrv.org.uk/listinfo/opentrv-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opentrv.org.uk/pipermail/opentrv-dev/attachments/20140319/4c05a580/attachment.html>


More information about the OpenTRV-dev mailing list