Skip to content

Commit

Permalink
Feature/rotation (#4)
Browse files Browse the repository at this point in the history
* fixed resistor values (not on screenshot)
* Added rotation feature for display
* added PCB pictures
  • Loading branch information
zarath committed Sep 20, 2023
1 parent 77f7e28 commit e697a13
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ opt-level = 's'
[features]
default = []
call-tone = []
rotate = []
4 changes: 2 additions & 2 deletions KiCad/subtone.kicad_sch
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@
(property "Reference" "R3" (at 77.47 40.64 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "470R" (at 76.2 43.18 0)
(property "Value" "4.7k" (at 76.2 43.18 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder" (at 80.772 43.18 90)
Expand Down Expand Up @@ -1467,7 +1467,7 @@
(property "Reference" "R2" (at 69.85 40.64 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "470R" (at 68.58 43.18 0)
(property "Value" "4.7k" (at 68.58 43.18 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder" (at 73.152 43.18 90)
Expand Down
3 changes: 3 additions & 0 deletions Prototype_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Prototype_2b.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Prefer tantalum caps for better switching supression.

![prototype](Prototype.jpg "Prototype attached to 23cm tranciever")

![prototype](Prototype_2.jpg "First prototype PCB (needs a bodge)")
![prototype](Prototype_2b.jpg "First prototype PCB (needs a bodge, backside)")

Waveform Example
----------------

Expand Down
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ include!(concat!(env!("OUT_DIR"), "/fontmap.rs"));
const ADDR_OFFSET: u32 = 2 * 1024 * 1024 - 4096;
const FLASH_SIZE: usize = 2 * 1024 * 1024;

#[cfg(not(feature = "rotate"))]
const DISP_ROTATION: DisplayRotation = DisplayRotation::Rotate0;
#[cfg(feature = "rotate")]
const DISP_ROTATION: DisplayRotation = DisplayRotation::Rotate180;

#[cfg(not(feature = "call-tone"))]
const SUBTONES: [f32; 51] = [
67.0, 69.3, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4, 88.5, 91.5, 94.8, 97.4, 100.0, 103.5, 107.2,
Expand Down Expand Up @@ -250,8 +255,8 @@ async fn core0_task(

info!("Set up Display");
let interface = I2CDisplayInterface::new(i2c);
let ref mut display = Ssd1306::new(interface, DisplaySize128x64, DisplayRotation::Rotate180)
.into_buffered_graphics_mode();
let ref mut display =
Ssd1306::new(interface, DisplaySize128x64, DISP_ROTATION).into_buffered_graphics_mode();
display.init().unwrap();
display.set_brightness(Brightness::DIM).unwrap();

Expand Down

0 comments on commit e697a13

Please sign in to comment.