Compare commits

...

5 Commits

Author SHA1 Message Date
Lucien RENAUD 0f02606700 Merge branch 'master' of ssh://lurenaud.com:2222/lurenaud/PicoNas 2022-11-15 14:30:09 +01:00
Lucien RENAUD 3961728b2f Various stuff save 2022-11-15 14:07:56 +01:00
Lucien RENAUD f980889b36 Add Arduino Code to programm PD chip 2022-11-15 14:07:36 +01:00
Lucien RENAUD 19c54b7f0f Changes Kicad: fix stuff from V1.2 2022-11-15 14:06:37 +01:00
Lucien RENAUD 5be526cd54 Add hinge and vent 2022-09-21 18:53:05 +02:00
22 changed files with 478254 additions and 24 deletions

Binary file not shown.

BIN
CAD/Enclosure_base.STL Normal file

Binary file not shown.

Binary file not shown.

BIN
CAD/Enclosure_huat.STL Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1279,6 +1279,9 @@
(junction (at 179.07 83.82) (diameter 0.9144) (color 0 0 0 0)
(uuid aa79024d-ca7e-4c24-b127-7df08bbd0c75)
)
(junction (at 46.99 127) (diameter 0) (color 0 0 0 0)
(uuid aede5efa-86d5-4d3f-9692-3ad0c286ba60)
)
(junction (at 53.34 104.14) (diameter 0.9144) (color 0 0 0 0)
(uuid b5071759-a4d7-4769-be02-251f23cd4454)
)
@ -1376,7 +1379,12 @@
(no_connect (at 57.15 101.6) (uuid 530f19ac-23de-4dbc-8c25-612b0faf7f39))
(no_connect (at 243.84 91.44) (uuid 5408ae83-5a4b-4000-975c-0b6719d9c936))
(no_connect (at 118.11 53.34) (uuid 5a09abbc-fb08-4803-bc55-b2fb300c6f51))
(no_connect (at 118.11 116.84) (uuid 5dcb9b55-2fc8-428e-994d-d22aed72cae7))
(no_connect (at 118.11 124.46) (uuid 5dcb9b55-2fc8-428e-994d-d22aed72cae7))
(no_connect (at 118.11 142.24) (uuid 5dcb9b55-2fc8-428e-994d-d22aed72cae7))
(no_connect (at 118.11 144.78) (uuid 5dcb9b55-2fc8-428e-994d-d22aed72cae7))
(no_connect (at 182.88 33.02) (uuid 5e1c9324-bdb9-43d6-bfee-e89d47618eed))
(no_connect (at 118.11 73.66) (uuid 5e4d603d-9b88-426d-8961-0eddd6632d26))
(no_connect (at 57.15 58.42) (uuid 6c14c901-6ffe-4060-9568-f3736b8187dc))
(no_connect (at 182.88 142.24) (uuid 6d30728c-cc42-497c-8ec5-f4d076376677))
(no_connect (at 182.88 134.62) (uuid 7d9574e1-6e30-4592-abc5-82433f1e4c44))
@ -1385,8 +1393,16 @@
(no_connect (at 182.88 101.6) (uuid 84538845-dbbe-47c1-98dc-83cf6f421ec6))
(no_connect (at 243.84 119.38) (uuid 8880a73d-eb58-471e-bb93-293f71c6ee7c))
(no_connect (at 243.84 83.82) (uuid 898c3db5-fb6e-4af5-a251-56b453b1d485))
(no_connect (at 118.11 114.3) (uuid 95d6e6f7-1da5-4257-9804-d1cdec311734))
(no_connect (at 118.11 101.6) (uuid 95d6e6f7-1da5-4257-9804-d1cdec311734))
(no_connect (at 118.11 106.68) (uuid 95d6e6f7-1da5-4257-9804-d1cdec311734))
(no_connect (at 118.11 109.22) (uuid 95d6e6f7-1da5-4257-9804-d1cdec311734))
(no_connect (at 118.11 121.92) (uuid 95d6e6f7-1da5-4257-9804-d1cdec311734))
(no_connect (at 118.11 60.96) (uuid 97d63a2b-d908-4b43-83bf-3708178b6c4e))
(no_connect (at 182.88 119.38) (uuid 990738fc-19da-4674-9609-1cae085333c2))
(no_connect (at 57.15 48.26) (uuid 9b8b722b-d6dd-42f2-9c67-9c559e3ca012))
(no_connect (at 57.15 50.8) (uuid 9b8b722b-d6dd-42f2-9c67-9c559e3ca012))
(no_connect (at 57.15 53.34) (uuid 9b8b722b-d6dd-42f2-9c67-9c559e3ca012))
(no_connect (at 118.11 99.06) (uuid 9bbf37cb-00fc-4f03-a825-c1c868dcfea6))
(no_connect (at 182.88 127) (uuid 9c363296-676d-4e58-a640-f9400893aa15))
(no_connect (at 243.84 154.94) (uuid 9e4e0a1e-abfb-4b16-ac1c-d43a694210c7))
@ -1402,15 +1418,27 @@
(no_connect (at 243.84 127) (uuid b0134e1e-ee1c-42b2-b21d-3410050a1c8d))
(no_connect (at 243.84 142.24) (uuid b3360119-db02-4382-8c16-449abbab704a))
(no_connect (at 243.84 78.74) (uuid b3b22ef7-bfa8-4304-8ba5-47bf97b2fc00))
(no_connect (at 57.15 73.66) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 106.68) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 109.22) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 114.3) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 116.84) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 119.38) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 124.46) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 129.54) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 132.08) (uuid b5e6de56-c059-4049-b33d-7a4659da301f))
(no_connect (at 57.15 60.96) (uuid bb3cfd0d-43a8-4cfa-99f2-297b8b4ca525))
(no_connect (at 243.84 96.52) (uuid bdf583f1-cf53-482a-9e2c-c46ee0e8fb29))
(no_connect (at 182.88 111.76) (uuid c07b80cc-39d3-44e5-9f86-2ce94351b36c))
(no_connect (at 118.11 81.28) (uuid c855c2df-66c2-4998-9189-a1c21b6424a5))
(no_connect (at 57.15 149.86) (uuid c8d4117d-8e5f-4ae4-89c1-c9629b3803a7))
(no_connect (at 57.15 147.32) (uuid c8d4117d-8e5f-4ae4-89c1-c9629b3803a7))
(no_connect (at 57.15 86.36) (uuid c986b11e-82d0-4495-a9c3-c56b13a696d2))
(no_connect (at 243.84 147.32) (uuid ca481902-08b4-4566-b1ff-53b08db34362))
(no_connect (at 243.84 93.98) (uuid cefc1088-69cc-4b58-9ef4-d8bf8986812f))
(no_connect (at 182.88 132.08) (uuid d0457639-b54a-4c16-8985-968a78bf14fd))
(no_connect (at 57.15 63.5) (uuid d1ac1105-7d41-460b-8fbc-72c1e843f3fc))
(no_connect (at 57.15 154.94) (uuid d1d1f225-7f28-4e6f-b3d4-aa02c9c3b042))
(no_connect (at 182.88 96.52) (uuid d84de74c-e967-4ef9-aa4f-6dec311fd395))
(no_connect (at 182.88 78.74) (uuid e928f17e-f782-4129-80cf-5309de971a12))
(no_connect (at 182.88 63.5) (uuid eacd19f5-e69e-40ab-95af-369701fd2212))
@ -1563,6 +1591,10 @@
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 33ef2f52-b1e4-4445-acd9-18a89e656efa)
)
(wire (pts (xy 46.99 123.19) (xy 46.99 127))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 340f26d8-ee4c-4bda-b2d2-536eb5f6ec2c)
)
(wire (pts (xy 243.84 129.54) (xy 247.65 129.54))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 3428d7f5-c916-425c-9ffd-02e6ba21a5b6)
@ -1607,7 +1639,7 @@
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 41fd218c-6b05-4ddd-bdeb-b88bbcd6208c)
)
(wire (pts (xy 46.99 132.08) (xy 46.99 134.62))
(wire (pts (xy 46.99 127) (xy 46.99 134.62))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 46e3e20a-1297-4631-90a6-b23f1b843ad3)
)
@ -1775,6 +1807,10 @@
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 939188e3-5716-462c-8624-0759bbc5e59a)
)
(wire (pts (xy 46.99 127) (xy 57.15 127))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 96b7f39a-a93a-4e14-b8a5-16c132c1de4e)
)
(wire (pts (xy 53.34 55.88) (xy 53.34 68.58))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 972eebee-a48b-4c30-af51-b6fdcb85d02d)
@ -2292,17 +2328,17 @@
(pin "2" (uuid 0742ebbe-29b6-4ce8-818b-59b87c6249e2))
)
(symbol (lib_id "power:+3V3") (at 46.99 132.08 0) (unit 1)
(symbol (lib_id "power:+3V3") (at 46.99 123.19 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid 57053a22-a96a-4d0d-8367-94acde8bea14)
(property "Reference" "#PWR0173" (id 0) (at 46.99 135.89 0)
(property "Reference" "#PWR0173" (id 0) (at 46.99 127 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 48.26 127 0))
(property "Footprint" "" (id 2) (at 46.99 132.08 0)
(property "Value" "+3V3" (id 1) (at 48.26 118.11 0))
(property "Footprint" "" (id 2) (at 46.99 123.19 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 46.99 132.08 0)
(property "Datasheet" "" (id 3) (at 46.99 123.19 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid dec33410-c818-4011-a391-d58dce9497f4))

View File

@ -2090,8 +2090,8 @@
(pin "7" (uuid 12bde0ee-1ca6-43f0-a533-1821ed80e39e))
(pin "8" (uuid 93e6e377-92c1-489b-91ec-7bf563c683df))
(pin "9" (uuid da8b5087-9279-4791-8310-7bf7a806015a))
(pin "sh" (uuid 756d6b32-146c-4e72-8303-453ee4d5c92b))
(pin "sh" (uuid 756d6b32-146c-4e72-8303-453ee4d5c92b))
(pin "sh" (uuid 756d6b32-146c-4e72-8303-453ee4d5c92c))
(pin "sh" (uuid 756d6b32-146c-4e72-8303-453ee4d5c92c))
)
(symbol (lib_id "power:GND") (at 119.38 99.06 0) (unit 1)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@
(aux_axis_origin 171.2 118.5)
(grid_origin 171.2 118.5)
(pcbplotparams
(layerselection 0x00010fc_ffffffff)
(layerselection 0x0000030_7ffffff8)
(disableapertmacros false)
(usegerberextensions false)
(usegerberattributes true)
@ -78,7 +78,7 @@
(hpglpenspeed 20)
(hpglpendiameter 15.000000)
(dxfpolygonmode true)
(dxfimperialunits true)
(dxfimperialunits false)
(dxfusepcbnewfont true)
(psnegative false)
(psa4output false)
@ -87,11 +87,11 @@
(plotinvisibletext false)
(sketchpadsonfab false)
(subtractmaskfromsilk false)
(outputformat 1)
(outputformat 3)
(mirror false)
(drillshape 0)
(scaleselection 1)
(outputdirectory "Gerber/")
(outputdirectory "./")
)
)

View File

@ -1331,6 +1331,9 @@
(path "/434dd5a3-6cc5-44aa-947e-28f318590be3"
(reference "#PWR0184") (unit 1) (value "GND") (footprint "")
)
(path "/cc4e2399-44cd-43eb-b026-ebe39d7ae688/20c165ee-3aad-4b2b-81c4-cadcf52189fa"
(reference "#PWR?") (unit 1) (value "GND") (footprint "")
)
(path "/41ea58f6-1eae-4678-a863-41eb5f7e9526/9deff1fa-4ae7-4646-99db-a513dce29581"
(reference "C1") (unit 1) (value "100n") (footprint "Capacitor_SMD:C_0402_1005Metric")
)
@ -1734,7 +1737,7 @@
(reference "R19") (unit 1) (value "100") (footprint "Resistor_SMD:R_0402_1005Metric")
)
(path "/cc4e2399-44cd-43eb-b026-ebe39d7ae688/dea033b1-0669-4be4-856e-7dd97525e0db"
(reference "R20") (unit 1) (value "1k") (footprint "Resistor_SMD:R_0402_1005Metric")
(reference "R20") (unit 1) (value "10") (footprint "Resistor_SMD:R_0402_1005Metric")
)
(path "/cc4e2399-44cd-43eb-b026-ebe39d7ae688/5bc0746d-4456-4690-8e21-e2925bb11381"
(reference "R21") (unit 1) (value "20k") (footprint "Resistor_SMD:R_0402_1005Metric")
@ -1757,6 +1760,9 @@
(path "/1044dfb8-d7d4-4d93-8668-ab271d88d7a4/31df3ba5-45c3-4a37-a752-40860eba9e22"
(reference "R27") (unit 1) (value "1k") (footprint "Resistor_SMD:R_0402_1005Metric")
)
(path "/cc4e2399-44cd-43eb-b026-ebe39d7ae688/f681614c-b03e-4981-8888-6801289d15a1"
(reference "R?") (unit 1) (value "10k") (footprint "Resistor_SMD:R_0402_1005Metric")
)
(path "/cc4e2399-44cd-43eb-b026-ebe39d7ae688/aef1b612-3986-4a3c-8ea7-29a170592955"
(reference "TP1") (unit 1) (value "TP_1V") (footprint "TestPoint:TestPoint_Pad_D1.5mm")
)

View File

@ -5701,7 +5701,7 @@
(property "Value" "" (id 1) (at 140.97 181.61 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 142.24 195.58 0)
(property "Footprint" "Package_SO:SOIC-8_3.9x4.9mm_P1.27mm" (id 2) (at 142.24 195.58 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.adestotech.com/wp-content/uploads/DS-AT25SF081_045.pdf" (id 3) (at 142.24 180.34 0)

View File

@ -1691,8 +1691,8 @@
(uuid fc052ac4-77ec-4901-baf8-c95f94903836)
)
(no_connect (at 90.17 74.93) (uuid 0504a62e-121f-4aa2-bfef-6ad97c2bd9ec))
(no_connect (at 120.65 102.87) (uuid 6ed6c740-c938-49da-9b42-336fec094392))
(no_connect (at 85.09 165.1) (uuid 8691ee75-3259-48e7-b89d-97414411715d))
(no_connect (at 120.65 105.41) (uuid cc93def9-1082-4e08-b7fc-37421bc0b751))
(no_connect (at 120.65 107.95) (uuid db9e8a8f-6f41-406c-9224-db0c8243882e))
(no_connect (at 90.17 105.41) (uuid ebcd84a3-36ad-46fc-bd70-cbc969a2a55c))
@ -1773,10 +1773,6 @@
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 119e9ef7-d9c8-4f17-93ec-62970529dc78)
)
(wire (pts (xy 104.14 119.38) (xy 105.41 119.38))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 12a2b3f1-91f7-48ae-add4-c585d8a0e0f6)
)
(wire (pts (xy 88.9 90.17) (xy 88.9 87.63))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 12c3a5b7-a607-4161-a808-bbe1e79e7425)
@ -2149,6 +2145,10 @@
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 7e3f947e-2164-4ebc-9ea7-c9a7eef3d72b)
)
(wire (pts (xy 80.01 74.93) (xy 90.17 74.93))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 8268bd77-ca92-42ad-9e09-12990fc24de3)
)
(wire (pts (xy 36.83 21.59) (xy 31.75 21.59))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 82b58147-667f-48d9-9a06-c9982f0c09ce)
@ -2382,6 +2382,10 @@
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid cd9fa482-e49c-4013-9ad8-1c0e0121620e)
)
(wire (pts (xy 72.39 74.93) (xy 72.39 76.2))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid cf4cc8dc-19f3-44aa-8a83-85aab55e2959)
)
(wire (pts (xy 160.02 157.48) (xy 160.02 165.1))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid cfbdadbc-269b-40be-814d-1b1eb3a3a0a6)
@ -2864,6 +2868,22 @@
(pin "2" (uuid 798b40f8-1dd6-4a8b-9b54-63c8eb3f17b5))
)
(symbol (lib_id "power:GND") (at 72.39 76.2 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid 20c165ee-3aad-4b2b-81c4-cadcf52189fa)
(property "Reference" "#PWR?" (id 0) (at 72.39 82.55 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 68.58 76.2 0))
(property "Footprint" "" (id 2) (at 72.39 76.2 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 72.39 76.2 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 3ef3a055-be55-442a-9e08-ac4379abe435))
)
(symbol (lib_id "Device:C") (at 163.83 63.5 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid 24fefbef-b142-43ec-8f30-1c026cbfc066)
@ -4057,8 +4077,8 @@
(in_bom yes) (on_board yes)
(uuid dea033b1-0669-4be4-856e-7dd97525e0db)
(property "Reference" "R20" (id 0) (at 224.79 40.64 90))
(property "Value" "1k" (id 1) (at 224.79 38.1 90))
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (id 2) (at 224.79 39.878 90)
(property "Value" "" (id 1) (at 224.79 38.1 90))
(property "Footprint" "" (id 2) (at 224.79 39.878 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 224.79 38.1 0)
@ -4067,7 +4087,7 @@
(property "MFR" "Yageo" (id 4) (at 224.79 38.1 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "MPN" "AC0402FR-071KL" (id 5) (at 224.79 38.1 0)
(property "MPN" "" (id 5) (at 224.79 38.1 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid b8e1258f-be34-4f3e-829d-52c3666b888e))
@ -4224,6 +4244,27 @@
(pin "2" (uuid ec9b5fce-4131-4cd0-9c6b-376da5d7e3c9))
)
(symbol (lib_id "Device:R") (at 76.2 74.93 270) (unit 1)
(in_bom yes) (on_board yes)
(uuid f681614c-b03e-4981-8888-6801289d15a1)
(property "Reference" "R?" (id 0) (at 76.2 72.39 90))
(property "Value" "10k" (id 1) (at 76.2 74.93 90))
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (id 2) (at 76.2 73.152 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 76.2 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "MFR" "Yageo" (id 4) (at 76.2 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "MPN" "RC0402FR-0710KP" (id 5) (at 76.2 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid f0a0a68d-6d93-4fd3-a675-bc4886c9a890))
(pin "2" (uuid 8db376af-0e52-4341-a765-c4365e59f7ee))
)
(symbol (lib_id "power:GND") (at 52.07 97.79 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid f8aeff73-d223-48d9-9b6f-ebbfa05d1f98)

5
USB PD ST4500 Set voltage/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

View File

@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

View File

@ -0,0 +1,39 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

View File

@ -0,0 +1,46 @@
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html

View File

@ -0,0 +1,20 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nucleo_f411re]
platform = ststm32
board = nucleo_f411re
lib_archive = false
framework = arduino
lib_deps =
sparkfun/SparkFun STUSB4500@^1.1.5
wire
monitor_port = COM5
monitor_speed = 115200

View File

@ -0,0 +1,116 @@
#include <Arduino.h>
#include <Wire.h>
#include <SparkFun_STUSB4500.h>
STUSB4500 usb;
void setup()
{
Serial.begin(115200);
Wire.begin(); //Join I2C bus
delay(500);
/* The Power Delivery board uses the default settings with address 0x28 using Wire.
Opionally, if the address jumpers are modified, or using a different I2C bus,
these parameters can be changed here. E.g. usb.begin(0x29,Wire1)
It will return true on success or false on failure to communicate. */
if(!usb.begin())
{
Serial.println("Cannot connect to STUSB4500.");
Serial.println("Is the board connected? Is the device ID correct?");
while(1);
}
Serial.println("Connected to STUSB4500!");
delay(100);
/* Read the Power Data Objects (PDO) highest priority (1-3) */
Serial.print("PDO Number: ");
Serial.println(usb.getPdoNumber());
/* Read settings for PDO1
- Voltage fixed at 5V
- Current value for PDO1 0-5A, if 0 used, FLEX_I value is used
- Under Voltage Lock Out fixed at 3.3V (but will always return 0)
- Over Voltage Lock Out 5-20%
*/
Serial.println();
Serial.print("Voltage1 (V): ");
Serial.println(usb.getVoltage(1));
Serial.print("Current1 (A): ");
Serial.println(usb.getCurrent(1));
Serial.print("Lower Voltage Tolerance1 (%): ");
Serial.println(usb.getLowerVoltageLimit(1));
Serial.print("Upper Voltage Tolerance1 (%): ");
Serial.println(usb.getUpperVoltageLimit(1));
Serial.println();
/* Read settings for PDO2
- Voltage 5-20V
- Current value for PDO2 0-5A, if 0 used, FLEX_I value is used
- Under Voltage Lock Out 5-20%
- Over Voltage Lock Out 5-20%
*/
Serial.print("Voltage2 (V): ");
Serial.println(usb.getVoltage(2));
Serial.print("Current2 (A): ");
Serial.println(usb.getCurrent(2));
Serial.print("Lower Voltage Tolerance2 (%): ");
Serial.println(usb.getLowerVoltageLimit(2));
Serial.print("Upper Voltage Tolerance2 (%): ");
Serial.println(usb.getUpperVoltageLimit(2));
Serial.println();
/* Read settings for PDO3
- Voltage 5-20V
- Current value for PDO3 0-5A, if 0 used, FLEX_I value is used
- Under Voltage Lock Out 5-20%
- Over Voltage Lock Out 5-20%
*/
Serial.print("Voltage3 (V): ");
Serial.println(usb.getVoltage(3));
Serial.print("Current3 (A): ");
Serial.println(usb.getCurrent(3));
Serial.print("Lower Voltage Tolerance3 (%): ");
Serial.println(usb.getLowerVoltageLimit(3));
Serial.print("Upper Voltage Tolerance3 (%): ");
Serial.println(usb.getUpperVoltageLimit(3));
Serial.println();
/* Read the flex current value (FLEX_I) */
Serial.print("Flex Current: ");
Serial.println(usb.getFlexCurrent());
/* Read the External Power capable bit */
Serial.print("External Power: ");
Serial.println(usb.getExternalPower());
/* Read the USB Communication capable bit */
Serial.print("USB Communication Capable: ");
Serial.println(usb.getUsbCommCapable());
/* Read the POWER_OK pins configuration */
Serial.print("Configuration OK GPIO: ");
Serial.println(usb.getConfigOkGpio());
/* Read the GPIO pin configuration */
Serial.print("GPIO Control: ");
Serial.println(usb.getGpioCtrl());
/* Read the bit that enables VBUS_EN_SNK pin only when power is greater than 5V */
Serial.print("Enable Power Only Above 5V: ");
Serial.println(usb.getPowerAbove5vOnly());
/* Read bit that controls if the Source or Sink device's
operating current is used in the RDO message */
Serial.print("Request Source Current: ");
Serial.println(usb.getReqSrcCurrent());
}
void loop()
{
}

View File

@ -0,0 +1,11 @@
This directory is intended for PlatformIO Test Runner and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PlatformIO Unit Testing:
- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html