File tree 11 files changed +184
-0
lines changed
11 files changed +184
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ Keeping your Pi cool is key when overclocking
3
+
4
+
5
+ Basic overclock
6
+
7
+ arm_freq=1000
8
+ gpu_freq=500
9
+ core_freq=500
10
+ sdram_freq=500
11
+ sdram_schmoo=0x02000020
12
+ over_voltage=2
13
+ sdram_over_voltage=2
14
+
15
+
16
+ Advance Overclock
17
+
18
+ arm_freq=1050
19
+ gpu_freq=500
20
+ core_freq=500
21
+ sdram_freq=500
22
+ sdram_schmoo=0x02000020
23
+ over_voltage=2
24
+ sdram_over_voltage=2
25
+
26
+
27
+ after we boot back up we can see if the overclock worked
28
+
29
+ Press F4 on your keyboard while running RetroPie and type in this command
30
+
31
+ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
32
+
Original file line number Diff line number Diff line change
1
+ config: dtoverlay=dwc2
2
+ cmdline: modules-load=dwc2,g_ether
3
+ file: ssh
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " " >> ~ /.bashrc
4
+ echo " # py = python3 interactive mode" >> ~ /.bashrc
5
+ echo " alias py='python3 -i'" >> ~ /.bashrc
6
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ touch $1
4
+ chmod 775 $1
5
+ nano $1
Original file line number Diff line number Diff line change
1
+ from gpiozero import LED , Button
2
+ from time import sleep
3
+ choice = input ("Do you want full controll? " )
4
+
5
+ led1 = LED (17 )
6
+ led2 = LED (27 )
7
+ led3 = LED (22 )
8
+
9
+ led1 .on ()
10
+ led2 .on ()
11
+ led3 .on ()
12
+ input ("Press enter to continue. " )
13
+ led1 .off ()
14
+ led2 .off ()
15
+ led3 .off ()
16
+
17
+ button1 = Button (20 )
18
+ button2 = Button (21 )
19
+
20
+ def blink1 ():
21
+ led1 .blink (1 ,2 )
22
+
23
+
24
+ def blink2 ():
25
+ led2 .blink (0.1 ,0.5 )
26
+
27
+
28
+ while choice != "yes" :
29
+ button1 .when_pressed = blink1
30
+ button1 .when_released = blink2
31
+ button2 .when_pressed = led1 .off
32
+ button2 .when_released = led2 .off
33
+ sleep (1 )
Original file line number Diff line number Diff line change
1
+ LED1 GPIO 17
2
+ LED2 GPIO 27
3
+ LED3 GPIO 22
4
+
5
+ Button1 GPIO 21
6
+ Button2 GPIO 20
7
+ GND
Original file line number Diff line number Diff line change
1
+ from gpiozero import LED , Button
2
+ from time import sleep , time
3
+
4
+ led1 = LED (17 )
5
+ led2 = LED (27 )
6
+ led3 = LED (22 )
7
+
8
+ button1 = Button (20 )
9
+ button2 = Button (21 )
10
+
11
+ print ("Active" )
12
+ led1 .on ()
13
+ led2 .off ()
14
+ led3 .off ()
15
+
16
+ def start ():
17
+ print ("Started" )
18
+ led3 .blink (0.5 , 0.5 )
19
+ global before
20
+ before = time ()
21
+
22
+ def stop ():
23
+ print ("Stoped" )
24
+ led3 .off ()
25
+ after = time ()
26
+ print (str (round (after - before ,2 ))+ " S" )
27
+ print ("" )
28
+
29
+ while True :
30
+ button1 .when_pressed = start
31
+ button2 .when_pressed = start
32
+ button1 .when_released = stop
33
+ button2 .when_released = stop
Original file line number Diff line number Diff line change
1
+ from gpiozero import LED , Button
2
+ from time import sleep
3
+
4
+ red = LED (17 )
5
+ amber = LED (27 )
6
+ green = LED (22 )
7
+
8
+ button1 = Button (20 )
9
+ button2 = Button (21 )
10
+
11
+ green .on ()
12
+ amber .off ()
13
+ red .off ()
14
+
15
+ def stop ():
16
+ print ("stop" )
17
+ green .off ()
18
+ amber .on ()
19
+ sleep (1 )
20
+ amber .off ()
21
+ red .on ()
22
+
23
+ def go ():
24
+ print ("go" )
25
+ amber .on ()
26
+ red .off ()
27
+ sleep (1 )
28
+ green .on ()
29
+ amber .off ()
30
+
31
+ def man ():
32
+ print ("manual mode" )
33
+ state = ""
34
+ while state != "man" :
35
+ state = input ("go or stop? " )
36
+ if state == "go" :
37
+ go ()
38
+ elif state == "stop" :
39
+ stop ()
40
+
41
+ while True :
42
+ button2 .when_pressed = go
43
+ button2 .when_released = stop
44
+ button1 .when_pressed = man
45
+ sleep (1 )
You can’t perform that action at this time.
0 commit comments