Search results

  1. hippy

    Happy Palindrome Day

    A proper, universally accepted, palindrome date : 2020-02-02 and 02/02/2020. Last one was 1111-11-11 and 11/11/1111. Next one will be 2121-12-12 and 12/12/2121. Missed the last and likely won't be around for the next. A genuine 'once in a lifetime' experience.
  2. hippy

    A clever way of determining Absolute value

    The usual approach for determining the absolute value of a two's complement number stored in a word variable is as follows, where the two's complement number is placed in 'w0' with the absolute value result placed in 'w1' - w0 = -2 If w0 < $8000 Then ; Positive value in w0 w1 = w0 Else...
  3. hippy

    Binary division and modulo from first principles

    Looking at doing some multi-word maths I realized I had no idea how to actually do binary division, let alone modulo apart from the convoluted mechanism of using the result of the division multiplied then subtracted. That all sounded like a lot of complexity. So I dived in to finally, after...
  4. hippy

    Displaying 24, 32, 48 and 64-bit hexadecimal, signed and unsigned decimal values

    Displaying 24, 32, 48 and 64-bit hexadecimal, signed and unsigned decimal values While greater than 16-bit maths can be relatively straightforward with the right code, showing multi-word numbers as decimal values can be a little complicated. These routines show how that can be done with a...
  5. hippy

    SVAB Hydraulik HECR II Thumb Roller

    Just in case anyone else comes across one of these, happens to be chopping a backhoe or excavator in their yard ... ; SVAB Hydraulik HECR II Hall-Effect Proportional Thumb Roller ; _________ ; / | ; 5V --.-- |___ |\...
  6. hippy

    Forum code test

    ;TM1637_test.bas #picaxe 08m2 ;segment data for TM1637 ;( 0 1 2 3 4 5 6 7 8 9 A b C d E F dash blank) DATA 0,($3f,$06,$5b,$4f,$66,$6d,$7d,$07,$7f,$6f,$77,$7c,$39,$5e,$79,$71, $40, $00) ;for TM1637 symbol dio = C.1 ;TM1637 data pin...
  7. hippy

    Accessing single resources during multi-tasking

    Sometimes multiple tasks of a multi-tasking program will desire access to a single resource of the PICAXE; serial, LCD, I2C, PWMOUT, etc. If two or more tasks try to access the same resource simultaneously they can often trample over each other and the outcome will not be as intended. For...
  8. hippy

    PICAXE Macros

    Introduction Macros are a useful tool which PICAXE Editor 6 supports. Macros are quite simple to use once familiar with them and how they work but many people will not be familiar with their use, not clear on how to use them, when or where to use them. This document is intended to be a brief...
  9. hippy

    XenForo Font Sizes

    Using This is size N tags, where N can be from 1 to 7 ... This is size 1 This is size 2 This is size 3 This is size 4 This is size 5 This is size 6 This is size 7 To use for emphasising posted text - This is normal, This is bold, This is size 5, This is size 6, This is size 7. So, as an...
  10. hippy

    LED Colour Guide

    Here's a useful link which details what wavelengths and Vforward voltages there are for a range of typical LED's - http://www.lumex.com/article/led-color-guide
  11. hippy

    Macros within IF commands

    Due to the way the pre-processor and syntax checking works within PICAXE Editor 6 there are some tricks which may not be immediately obvious but with a bit of lateral thinking can be put to good use. For example, having macro style function calls in IF commands, for example - If Matched(...
  12. hippy

    Bomb scare caution

    "Stevenage bomb scare: Small explosion heard after bomb squad attend suspicious &#8216;coffee cup&#8217; device found" http://www.thecomet.net/news/stevenage-bomb-scare-small-explosion-heard-after-bomb-squad-attend-suspicious-coffee-cup-device-found-near-tk-maxx-1-5211919 From the photos it...
  13. hippy

    Conditional Macros - #MACRO with #IFDEF

    Because of the way things are, #MACRO and #IFDEF do not play well together in PICAXE basic. To create a macro which does one thing or another depending on a #DEFINE definition can seem impossible. For example, neither of the following two will pass syntax check - #Macro PrintLetter #IfDef...
  14. hippy

    WannaCrypt Ransomware

    Microsoft (KB4012598) have taken the step of releasing a security update for older systems; Windows XP, Windows Vista, Windows 8, Windows Server 2003 and 2008, and Windows XP embedded. We can't personally vouch for the effectiveness of any update or patch but these should protect against the...
  15. hippy

    Upload image test

    Testing upload of images
  16. hippy

    OLED Analogue Thermometer

    The Winstar OLED text modules we stock have a graphics mode. They may not as useful as a true graphics display, because the pixels are segmented into 8x5 character blocks with gaps between them, but they can still display useful graphics and using them graphically allows more than eight user...
  17. hippy

    Centre of line tracking algorithm

    This line tracking malarky got me intrigued so here's my take on things. I am assuming a 128 pixel sensor reading zero ( "no line" ) or non-zero ( "line present" ) values into 128 bytes of scratchpad. Because I don't have a sensor I simply fake a sensor reading which I poke into scratchpad...
  18. hippy

    Calculating Day of the Week

    This calculates the day of the week from a date. Based on Zeller's algorithm I think, made as simple as it can be and without optimisation as adding that can make it all a bit confusing and require more temporary variables. The 'dow' value ( 1 to 7 ) is compatible with the value required when...
  19. hippy

    Preserving data for after a RESET command

    Here's an early Christmas present. A neat trick for preserving data when a RESET command is executed and resetting that data to a known initial value when an actual power-cycle reset occurs. All without using EEPROM storage - #Picaxe 08M2 #Terminal 4800 #No_Data Symbol ADRESL = $3B ; $09B...
  20. hippy

    File size test

    Just a quick test to check we can add 25KB Basic files as attachments
Top