connectome/connectome.py
def main():
    """Here is where you would put in a method to stimulate the neurons
    We stimulate chemosensory neurons constantly unless nose touch
    (sonar) is stimulated and then we fire nose touch neurites.
    """

    while True:
        if not disembodied:
            dist = us_dist(15)
        else:
            # use a fixed value if you want to stimulte nose touch
            # use something like "dist = 27" if you want to stop nose stimulation
            dist = 27

        # Do we need to switch states at the end of each loop? No, this is done inside the runconnectome()
        # function, called inside each loop.
        if dist>0 and dist<30:
            if verbosity > 0:
                print "OBSTACLE (Nose Touch)", dist
            dendriteAccumulate("FLPR")
            dendriteAccumulate("FLPL")
            dendriteAccumulate("ASHL")
            dendriteAccumulate("ASHR")
            dendriteAccumulate("IL1VL")
            dendriteAccumulate("IL1VR")
            dendriteAccumulate("OLQDL")
            dendriteAccumulate("OLQDR")
            dendriteAccumulate("OLQVR")
            dendriteAccumulate("OLQVL")
            runconnectome()
        else:
            if tfood < 2:
                if verbosity > 0:
                    print "FOOD"
                dendriteAccumulate("ADFL")
                dendriteAccumulate("ADFR")
                dendriteAccumulate("ASGR")
                dendriteAccumulate("ASGL")
                dendriteAccumulate("ASIL")
                dendriteAccumulate("ASIR")
                dendriteAccumulate("ASJR")
                dendriteAccumulate("ASJL")
                runconnectome()
                time.sleep(0.5)
            tfood += 0.5
            if (tfood > 20):
                tfood = 0
Here is where you would put in a method to stimulate the neurons
    We stimulate chemosensory neurons constantly unless nose touch
    (sonar) is stimulated and then we fire nose touch neurites.
    
Here is where you would put in a method to stimulate the neurons
We stimulate chemosensory neurons constantly unless nose touch
(sonar) is stimulated and then we fire nose touch neurites.
Here is where you would put in a method to stimulate the neurons We stimulate chemosensory neurons constantly unless nose touch ( sonar ) is stimulated and then we fire nose touch neurites .
def main():
    while True:
        if not disembodied:
            dist = us_dist(15)
        else:
            dist = 27
        if dist>0 and dist<30:
            if verbosity > 0:
                print "OBSTACLE (Nose Touch)", dist
            dendriteAccumulate("FLPR")
            dendriteAccumulate("FLPL")
            dendriteAccumulate("ASHL")
            dendriteAccumulate("ASHR")
            dendriteAccumulate("IL1VL")
            dendriteAccumulate("IL1VR")
            dendriteAccumulate("OLQDL")
            dendriteAccumulate("OLQDR")
            dendriteAccumulate("OLQVR")
            dendriteAccumulate("OLQVL")
            runconnectome()
        else:
            if tfood < 2:
                if verbosity > 0:
                    print "FOOD"
                dendriteAccumulate("ADFL")
                dendriteAccumulate("ADFR")
                dendriteAccumulate("ASGR")
                dendriteAccumulate("ASGL")
                dendriteAccumulate("ASIL")
                dendriteAccumulate("ASIR")
                dendriteAccumulate("ASJR")
                dendriteAccumulate("ASJL")
                runconnectome()
                time.sleep(0.5)
            tfood += 0.5
            if (tfood > 20):
                tfood = 0
def main ( ) : while True : if not disembodied : dist = us_dist ( 15 ) else : dist = 27 if dist > 0 and dist < 30 : if verbosity > 0 : print "OBSTACLE (Nose Touch)" , dist dendriteAccumulate ( "FLPR" ) dendriteAccumulate ( "FLPL" ) dendriteAccumulate ( "ASHL" ) dendriteAccumulate ( "ASHR" ) dendriteAccumulate ( "IL1VL" ) dendriteAccumulate ( "IL1VR" ) dendriteAccumulate ( "OLQDL" ) dendriteAccumulate ( "OLQDR" ) dendriteAccumulate ( "OLQVR" ) dendriteAccumulate ( "OLQVL" ) runconnectome ( ) else : if tfood < 2 : if verbosity > 0 : print "FOOD" dendriteAccumulate ( "ADFL" ) dendriteAccumulate ( "ADFR" ) dendriteAccumulate ( "ASGR" ) dendriteAccumulate ( "ASGL" ) dendriteAccumulate ( "ASIL" ) dendriteAccumulate ( "ASIR" ) dendriteAccumulate ( "ASJR" ) dendriteAccumulate ( "ASJL" ) runconnectome ( ) time . sleep ( 0.5 ) tfood += 0.5 if ( tfood > 20 ) : tfood = 0
Here is where you would put in a method to stimulate the neurons
We stimulate chemosensory neurons constantly unless nose touch
(sonar) is stimulated and then we fire nose touch neurites.
Here is where you would put in a method to stimulate the neurons We stimulate chemosensory neurons constantly unless nose touch ( sonar ) is stimulated and then we fire nose touch neurites .
"""Here is where you would put in a method to stimulate the neurons
    We stimulate chemosensory neurons constantly unless nose touch
    (sonar) is stimulated and then we fire nose touch neurites.
    """ # use a fixed value if you want to stimulte nose touch # use something like "dist = 27" if you want to stop nose stimulation # Do we need to switch states at the end of each loop? No, this is done inside the runconnectome() # function, called inside each loop.