Free Ground Shipping on all orders over $100 (US Only)
login   |   Register

Welcome Forums Tarts for Raspberry Pi Issue running examples

This topic contains 15 replies, has 7 voices, and was last updated by Matt John Matt 6 months, 3 weeks ago.

  • Author
    Posts
  • #3393
    scott
    scott
    Participant

    I have setup my PI following the plate documentation found here: https://www.tartssensors.com/libraries/raspberry-pi/ . Everything compiles fine and runs without any issues. I have made my gateway and sensor id changes to the examples compiled then tried running the examples. All examples run but they produce the same issue. They seem to be going ON/OFF over and over. The green LED never becomes solid and you can barely see it flash.

    STARTING
    OFF
    STARTING
    OFF
    STARTING
    OFF

    This is a new PI B+ and never used before. Should I try using one of my PI B units and test. Any suggestions on how to move forward?

    Thanks

  • #3394
    Kelly Lewis
    kellyl
    Participant

    Hello Scott,

    Starting – OFF (repeat) means the PI is not able to get a connection to plate. The little blip of light you are seeing on the activity pin is the reset occurring. This makes me think you have it connected properly, otherwise power is not there to flash the light, but just to be sure, check that your have the plate connected correctly.

    Another thing you can try to get more information out of the TartsLib is to turn of the debug prints in the library. Uncomment the “#define TARTS_DEBUG” near the top of “tarts.h”, save and then run “sudo ./build all” to remove the old library and rebuild all new files.

    If that information does not help, You may way to look at the reset pin on the plate (pin 7 on the radio module). It should be ~3.3VDC but if it is not that, there may be a issue with the hardware.

    Please try these options and see what you find.

    Good luck

  • #3408
    scott
    scott
    Participant

    Ran “sudo ./build all” and was able to get the examples to work.

    Thanks

  • #3516
    Brian Grawburg
    Brian
    Participant

    Perhaps it’s because I know nothing about C++ and compiling a program, but I believe I have followed the directions correctly on page 5 of the Raspberry Pi setup. I made a change in one of the examples by adding my sensor & gateway IDs and save the file as TartsWater.cpp. I then ran “sudo ./build all”. Then ran “sudo ./TartsWater” and get the error the command is not found.

    Is there more to compiling and running than is given in the Setup Procedure?

    • This reply was modified 3 years, 9 months ago by Brian Grawburg Brian.
    • This reply was modified 3 years, 9 months ago by Brian Grawburg Brian.
  • #3519
    Brian Grawburg
    Brian
    Participant

    I finally got things working. The issue is with the Setup Procedure — it is not clearly written. Nothing about making a folder to put the Tarts libraries in and then nothing that tells you to switch to that folder and run the “build” within it. Very exasperating. Now I’m going to write the Python code to tell the Pi what to do when the water detection sensor detects water.

    • #3882
      Bill_S
      Bill_S
      Participant

      @bgrawburg, I noticed your message about getting things working after receiving a message “Command Not Found”. I’m getting the same error, but can’t seem to get it to work. I attempted to cd to a folder I created for the library files (I just dumped he files from the download folder into the new folder I created under “wiringPI”), but I still get the same error. Any chance you did anything else to get yours to work? I agree the instructions are really vague, and I can’t get anyone to respond to my ticket and community post.

  • #3520
    Brian Grawburg
    Brian
    Participant

    I have the same issue Scott did. I did try the gateway on a new B+ and got the same results. I don’t have access to my multimeter where I am so I can’t take a voltage reading from pin 7. I will try this on Monday.

  • #3521
    Kelly Lewis
    kellyl
    Participant

    Brian,

    It is always a pain when the project you are working on is not working. I am anxious to here what you find.

  • #3522
    Kelly Lewis
    kellyl
    Participant

    Brian, Because this is a community page, perhaps you should send in the message to support@tartssensors.com. That way you are getting supported directly.
    ~Kelly

  • #3524
    Brian Grawburg
    Brian
    Participant

    Kelly, I contacted Support 2 days ago. No reply.

    My guess, at this point, is that the February 2015 Raspbian has “broken” the gateway connection. Since I don’t have an older version available I can’t confirm this. There is an easy fix on my end but I must know which GPIO pins the gateway uses. That question was just asked, so I’ll wait for an answer.

  • #3526
    Lynnette Kehaulani
    Lynnette Kehaulani
    Participant

    Brian,

    We had an issue with support items being routed improperly. The web admin has fixed the issue and we sincerely apologize for the delayed response.

    I would not blame 2015 Raspbian yet… I believe that when you created a new file, TartsWater.cpp, that it is not getting compiled into the project. Let’s address that first.

    I understand that you added a new file, TartsWater.cpp. That’s great! You will need to edit the Makefile to include your new file. Without altering any other text, please add these lines into the Makefile:

    ON LINE 20: See “SRC = TartsBasic.cpp \ ”

    you will need to add your new file to the bottom of the list on line 25. Note that you need to add the backward slash on line 24 as well. It should look like this:

    SRC = TartsBasic.cpp \
    TartsSniffer.cpp \
    TartsAdvanced.cpp \
    TartsBasicControl.cpp \
    TartsPersistence.cpp \
    TartsWater.cpp

    ON LINE 50: Insert the information for creating the .o file and linking it.

    TartsWater: TartsWater.o
    @echo [Linking : TartsWater]
    @$(CC) -o $@ TartsWater.o $(LDLIBS)

    Please note!!!!! The Makefile recognizes tabs as having a particular significance, and those spaces after SRC and TartsWater: are tabs and cannot be replaced with spaces…. (I am not sure if you can copy and paste this text and get the right results.) I think if the Makefile is confused it gives you an error about tabs, but I am not certain.

    Once you have edited the Makefile and made certain you have the tabbed spacing, save it and then run your commands again. Verify you are getting the right results by seeing that a TartsWater.o file is created. Go from there.

    Good luck!


    Lynnette
    support@tartssensors.com

  • #3883
    Brian Grawburg
    Brian
    Participant

    Tarts Sensors only work with an old version of WiringPi and Python. Forget trying to use one with a newer Pi. I am VERY disappointed with this product and consider it false advertising to suggest they work with a Pi. And they apparently have made no effort to fix the problem.

  • #3884
    Bill_S
    Bill_S
    Participant

    I’m starting to think the same thing. Guess it’s time to start looking elsewhere.

  • #5442
    Mike Arney
    @arneym
    Participant

    Does anyone else get an error when it starts compiling TartsPersistence.cpp? I get an error like this:

    TartsPersistence.cpp: In function ‘int findDevice(const char*)’:
    TartsPersistence.cpp:180:13: error: no match for ‘operator!=’ (operand types are ‘std::ifstream {aka td::basic_ifstream<char>}’ and ‘int’)
    if(infile != NULL){

    I also get a lot of other messages referring to “operator!”
    Do I need the TartsPersistence.cpp program to make the whole example to work? If not, how can I work around this file?

    Thanks,
    Mike

  • #9266
    Matt John
    Matt
    Participant

    I’m getting this same Loading > OFF > Starting loop as well after I upgraded to the latest version of raspbian. I’ve emailed support to see what they say if anything.

    I started it and watched it loop and came back after 15 or so minutes and it was working, it started up, was taking traffic from the sensors and throwing the data into my database as it should. Since I know it worked at least once, I’m determined to figure it out.

    This cannot be a power/hardware issue, it works fine if i put in the old SD card with the old OS/kernel on it.

    I get that same message from Mike above, but I just took the Persitant file out of the Makefile to get everything compiled.

    This is my output with debug on:

    TARTS-GWM[T5YC6O]-5: STATE::STARTING
    Sending!
    Inbound: 0xC50C0023309798000F000303002011-OK
    TARTS-GWM[T5YC6O]-8: STATE::LOADING
    Sending!
    Sending!
    Sending!
    TARTS-GWM[T5YC6O]-4: STATE::OFF
    Sending!
    TARTS-GWM[T5YC6O]-5: STATE::STARTING
    Sending!
    Sending!
    TARTS-GWM[T5YC6O]-4: STATE::OFF
    Sending!
    TARTS-GWM[T5YC6O]-5: STATE::STARTING
    • This reply was modified 6 months, 3 weeks ago by Matt John Matt.
  • #9283
    Matt John
    Matt
    Participant

    Solved my issue above:

    I did a ps aux | grep getty and noticed that /dev/ttyAMA0 was in use already by another process.

    This was blocking the gateway causing it to loop like that. To disable/fix run:

    sudo raspi-config

    Go to Interfaceing Options > P6 Serial > Say NO to “would you like a login shell to be accessible over serial” > choose YES to “would you like the serial port hardware to be enabled” > Finish/save out of that and reboot

    Next with the compile errors I ran:
    sed -i 's/-W1/Wl/g' libTarts/Makefile
    This replaces the wrong option on the new compiler

    Then in ./Makefile I removed all references to TartsPersistence.cpp as stated above. Recompile/build everything, and it should work.

    I hope this helps someone else!

You must be logged in to reply to this topic.

Support
Contact Us!

Your Name (required)

Your Email (required)

Subject

Your Message

Enter this code below: captcha