​ ​ ​ ​ Please point me to some step by step basics to code the PICAXE using Blockly. - Page 18
Page 18 of 20 FirstFirst ... 8 16 17 18 19 20 LastLast
Results 171 to 180 of 192

Thread: Please point me to some step by step basics to code the PICAXE using Blockly.

  1. #171
    Member
    Join Date
    May 2018
    Location
    Ft. Myers FL
    Posts
    84

    Default

    As much as I like low-tech solutions, the accelerometers really sound like a cool way to do this :-)
    The 28 x 2 arrived this week, as well as some breadboard jumper wires. Still waiting for accelerometers from China.

  2. #172

    Default

    Quote Originally Posted by lbenson View Post
    The strings are surely conductive. . .
    If the strings are conductive, then an electric guitar pickup (or similar sensor) could be an option?

  3. #173
    Senior Member
    Join Date
    Feb 2010
    Location
    Don't Mess With My Texas!
    Posts
    2,566
    Blog Entries
    7

    Default

    A hammered dulcimer has upwards of 30+ notes spread over a larger area than most stringed instruments.

    Having said that, Iím sure an electromagnetic sensor could be developed that spanned the strings to detect strikes.

  4. #174
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,829

    Default

    Quote Originally Posted by Dartmoor View Post
    If the strings are conductive, then an electric guitar pickup (or similar sensor) could be an option?
    Piezos would probably work--like these: https://www.amazon.com/15Pcs-Trigger.../dp/B07B8RJ8NX

  5. #175
    Member
    Join Date
    May 2018
    Location
    Ft. Myers FL
    Posts
    84

    Default

    The piezos would probably work, but would we need fifteen pins to spread them all over the instrument?

  6. #176
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,829

    Default

    Quote Originally Posted by Gramps View Post
    The piezos would probably work, but would we need fifteen pins to spread them all over the instrument?
    I don't think so. With a guitar, you only use one (I don't mean the kind of pickup which has 6 sensors). You don't need to distinguish notes, just determine that a strike has caused vibration which the piezo converts into an electrical impulse.
    Last edited by lbenson; 06-07-2018 at 19:01.

  7. #177
    Member
    Join Date
    May 2018
    Location
    Ft. Myers FL
    Posts
    84

    Default

    All these sensors are inexpensive so we plan to try several different kinds to see what works the best. We have a prop scope that's been sitting in the box for years might be a good time to test it out.;-)
    Last edited by Gramps; 06-07-2018 at 21:51.

  8. #178
    Member
    Join Date
    May 2018
    Location
    Ft. Myers FL
    Posts
    84

    Default

    lbenson, Help!
    When attempting to run your accelerometer code from post 135, we're getting a syntax error at:
    readadc10 C.1,w1 ' read "Z" axis of XL335 accelerometer
    Here is the code:

    #picaxe 28x2
    #no_table
    #no_data

    ; ================================================== =====
    ; Sequencing 7 LEDs to an XL335 accelerometer
    ; ================================================== =====

    Symbol D4 =B.7
    Symbol E4 =B.6
    Symbol Fs4= B.5 ;F#4
    Symbol G4 =B.4
    Symbol A4 =B.3
    Symbol Be4 =B.2 ;B4
    Symbol C5 =B.1
    Symbol hammer =pinC.1


    main:
    do
    readadc10 C.1,w1 ' read "Z" axis of XL335 accelerometer
    if w1 < 380 then ' acceleration towards a strike
    sertxd(#w1," ")
    pause 200 ' reduce/eliminate double reports
    endif
    pause 5
    loop

  9. #179
    Senior Member
    Join Date
    Jan 1970
    Location
    Colorado USA
    Posts
    3,212

    Default

    "Error: Pin C.1 has no ADC channel!" use a pin that has an ADC channel... there are 10 such pins refer to Manual 1

  10. #180
    Member
    Join Date
    May 2018
    Location
    Ft. Myers FL
    Posts
    84

    Default

    Thank you. That fixed it.
    Question, what is the best way 2 program the LED array?
    Each LED has two pins to activate, pulling one low and one high.
    How do we code that?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •