Skip to content

Commit

Permalink
push docu progress
Browse files Browse the repository at this point in the history
a lot
  • Loading branch information
FabioReeh committed Nov 4, 2024
1 parent 2a845f9 commit c8c1e80
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 164 deletions.
137 changes: 128 additions & 9 deletions code_usage.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,150 @@
# Electronics part 3: Program explanation


### Test run {pagestep}

auto rewards: make tub variable to CL for 2 and 4
>!! **todo**
>!!
>!! add programm screenshots
>! specify times and how to change
>!
>!
>!
>!

### Modifiy variables {pagestep}
## General information

- vlv 1 reward output because in bpod 1
All following informations assume that you have done the wiring exactly as indicated. This is necessary as the ports are specified in the scripts and will only work in that configuration.

- parameter gui pop up after start. There are all s.gui variables changeable
## How to start {pagestep}

Start by typing "Bpod()" in the Matlab console.

This will open a window to control the Bpod where you can open another window by clicking the play button.
This new window allows you to choose the script where you can start the preset experimental procedure.

## Experimental procedure {pagestep}

With the script starts one of four random cases is chosen for 100 iterations. Each case consists of a movement of the rotational motor to place the texture in the right position. Then the horizontal motor moves to present the texture to the mouse for 2 seconds. Afterwards the motor moves back and the next iterations starts.

During the procedure an extra window is open which displays the sequence of cases and wether the mouse did a lick or not and if it was correct or false. The window has four lanes with circles. Each lane represents a case.

Information of circles:

- Full green circle: Correctly licked
- Empty green circle: Wrongly not licked
- Full red circle: Wrongly licked
- Empty red circle: Correctly not licked


## Manual controlling {pagestep}

In the Bpod window, which opens after typing "Bpod()" in the console, are several possibilities to control the setup by typing in specific codes.

### Movement control

The movement information is forwarded by numbers to the Arduino Bpod shield. Use the following numbers to do the desired movements. These movements are specified in the Arduino code file.

#### Movement codes

Code "1":

- Front rotation by 90°
- Horizontal motor movement to texture present position

Code "2":

- Front rotation by 180°
- Horizontal motor movement to texture present position

Code "3":

- Front rotation by 270°
- Horizontal motor movement to texture present position

Code "4":

- Front rotation by 360°
- Horizontal motor movement to texture present position

Code "5":

- Back rotation by 270°
- Horizontal motor movement to default/ no texture present position

Code "6":

- Back rotation by 180°
- Horizontal motor movement to default/ no texture present position

Code "7":

- Back rotation by 90°
- Horizontal motor movement to default/ no texture present position

Code "8":

- No rotation
- Horizontal motor movement to default/ no texture present position

Code "9":

- Make sound with buzzer.

Code "10":

- Make a quarter turn.

Code "11":

- Make a 1/200 turn.





### Reward control

You can manually provide rewards to the mouse by clicking "vlv1".

The first click opens it and the second closes it.







### Additional informations {pagestep}

- In the Bpod window are all s.gui variables changeable
- These are changeable during a run

- "flexthreshold" needs to be adjusted depending on the lick strength

- "S.GUI.Reward" specifies the amount of rewards by the opening time

- TrialTypes = randsrc(1,MaxTrials,[1 2 3 4; 0.25 0.25 0.25 0.25]); // List of cases and their probability, maybe only use two cases because of wearing
- This specifies the cases and their probabilities

- Rotation speed defined by "for i in range 3000".
- Lateral speed also defines as delay


s. gui during run änderbar
flexthreshold: wie viel lick stärke
S.GUI.Reward: wie viel rewards


rotain speed defined by 3000 variables down definiert als delay
latspeed für lateralen geschw auch definiert als delay


derzeot nur töne unterschiedlicher länge impleementiete
als alternative arduino uno hinten dran und damit vers freqsaf
als alternative arduino uno hinten dran und damit vers freqsaf



### Training mode {pagestep}

Follow the [instruction](training.md) to use the training mode.



19 changes: 18 additions & 1 deletion electronic.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,32 @@ This step guides you the connection of the electronic devices.

{{BOM}}

## Combine Arduinos {pagestep}
## Connect electronic components {pagestep}

- Attach the [bpod shield](electronic.yml#bpod_shield){Qty:1} to the [Arduino Board Due Core](electronic.yml#Arduino_Due0lp-ö){Qty:1}. There is only one possibility to combine them based on the labeling of pins.



##





![](images/ardu_shield.png)

[bpod](electronic.yml#bpod){Qty:1}

[ethernet cable](electronic.yml#ethernet_cable){Qty:1}

[port interface board](electronic.yml#port_interface_board){Qty:1}

[bpod shield](electronic.yml#bpod_shield){Qty:1}

[solenoid pinch valve](electronic.yml#pv){Qty:1}

[tube](electronic.yml#pv_tube){Qty:1}

[circuit board](electronic.yml#circuit_board){Qty:some}.

[jumper wires](electronic.yml#jumper_wires){Qty:many}
Expand Down
6 changes: 5 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This website will guide you through the whole process of building an texture dis
The experimental setup was first published in 2018, with a paper titled [Behavioral Strategy Determines Frontal or Posterior
Location of Short-Term Memory in Neocortex](https://doi.org/10.1016/j.neuron.2018.07.029).
It was designed by the authors of the paper and rebuilt within Larkum Lab.
This documentation website was created by Fabio Reeh and reviewed by XXXX, based on the existing documentation and a own replica.
This documentation website was created by Fabio Reeh and reviewed by XXXX, based on the existing documentation and an own replica.

Gilad A, Gallero-Salas Y, Groos D, Helmchen F. Behavioral Strategy Determines Frontal or Posterior Location of Short-Term Memory in Neocortex. Neuron. 2018 Aug 22;99(4):814-828.e7. doi: 10.1016/j.neuron.2018.07.029. Epub 2018 Aug 9. PMID: 30100254.

Expand Down Expand Up @@ -122,6 +122,10 @@ We have access to a workshop, we recommend you to get the motors constructed the

I order to fully use the texture discrimination task setup, you need to debug and write code for the Arduino and Bpod. The provided code works but you need to adjust it at some places to adapt it to your circumstances.

### Disclaimer: No different sounds

In the version designed for the paper [Behavioral Strategy Determines Frontal or Posterior Location of Short-Term Memory in Neocortex](https://doi.org/10.1016/j.neuron.2018.07.029) multiple frequencies are used. This version can only create one frequency but changes in the amount of sounds. Forward movements of the horizontal motor happen along two short sounds and backwards movements with four sounds. The sound one can send with the code "9" is one longer sound (check documentation about how to use the program).


### Advice: Further development

Expand Down
11 changes: 11 additions & 0 deletions lick_detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,16 @@ possibility to see strength and adjust during the run


>i **Note**
>i
>i needle hold with piezo how with capacitive


>!! **Warning**
>!!
>!! maybe new capacity sensor



153 changes: 0 additions & 153 deletions models/MouseTubeSTL.html

This file was deleted.

8 changes: 8 additions & 0 deletions training.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ The Matlab script contains a trainings mode which can be used to habituate the m

The trainings mode ignores the lick detection and provides rewards if the right texture was presented.

To activate the trainings mode make "tup" variable to "CL" for case 2 and 4 in the Matlab script.



>!! **Warning**
>!!
>!! Adjust matlab script to have a top variable to activate trainingsmode

0 comments on commit c8c1e80

Please sign in to comment.