Now Reading
Jumperless |

Jumperless |

2023-10-11 05:02:10

I will do a high-level rationalization of what the code within the Jumperless is definitely doing. There’s so much occurring and it is in a bunch of separate recordsdata so I believe it is going to be useful for individuals who what to grasp or enhance upon it.

Desk of Contents  (bolded ones are on this mission log)

  • Normal phrases – the names I’ve determined to name issues
  • What’s being saved – how the general state is saved
  • File Parsing – how we fill in these arrays
  • Pathfinding – how we discover legitimate paths for every connection
  • Controlling the crosspoint switches – how we ship that information to the CH446Qs
  • LEDs – how we select distinctive colours for every internet
  • The Wokwi bridge app – how we scrape the Wokwi web page for updates

That is going to be actually lengthy and so I will be filling out components as I end them in no specific order.

I’ve made up phrases for issues right here that will or is probably not the formal definition, so I ought to most likely let what I selected.

Breadboard Chips – This refers back to the 8 CH446Q crosspoint switches (labeled A-H) which have their Y pins linked to the breadboard. This excludes Chip L which truly has it is X pins linked to the 4 corners of the board (rows 1, 30, 31 (b1), 60 (b30))

Particular Perform Chips – This refers back to the 4 crosspoints (labeled I-L) that hook up with every part else; the Nano header, energy provides, DACs, GPIO from the RP2040, and so forth…


Nodes – Additionally used synonymously with Row particularly when it is on the breadboard or Nano Header. And finish level to a bridge

Bridges – Simply 2 nodes that needs to be linked

Nets – Teams of nodes and bridges that ought to all be electrically linked to one another

Bounce – Typically there will not be an out there path instantly from one node to a different, so on this case it should choose one other chip with a free path to the beginning and finish chips and “bounce” by it.

See Also

Paths – Just like a bridge, besides that it accommodates information for how that bridge is linked. So it should have which chips and which X and X pins are wanted to make the connection

You will see a whole lot of these, they’re all in JumperlessDefinesRP2040.h. However the level of this complete that is so you do not have to dig by the code, so I will put the abridged model right here:

#outline CHIP_A 0
#outline CHIP_L 11

#outline t1  1
#outline t30 30

#outline b1  31
#outline b30 60

#outline NANO_D0  70 //these are utterly arbitrary
#outline NANO_A7  93

#outline GND  100 #outline SUPPLY_3V3  103
#outline SUPPLY_5V  105

#outline DAC0_5V  106 #outline DAC1_8V  107

#outline CURRENT_SENSE_PLUS  108

#outline ADC0_5V 110
#outline ADC1_5V 111
#outline ADC2_5V 112
#outline ADC3_8V 113

#outline EMPTY_NET 127

What’s being saved

There are a number of massive arrays of structs that retailer the general state of every part. Listed below are the principle ones:


This shops the precise {hardware} format of every of the 12 crosspoint switches, like what’s bodily linked the place and whether or not that path is getting used. Within the code it is and array referred to as ch[12] and it is in MatrixStateRP2040.h

//the struct
struct chipStatus{
int chipNumber;
char chipChar;
int8_t xStatus[16]; //retailer the bb row or nano conn that is ultimately linked to to allow them to be stacked if conns are redundant
int8_t yStatus[8];  //retailer the row/nano it is linked to
const int8_t xMap[16];
const int8_t yMap[8];

//the array of these structs
struct chipStatus ch[12] = {  {0,'A',  {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}, // x standing  {-1,-1,-1,-1,-1,-1,-1,-1}, //y standing  {CHIP_I, CHIP_J, CHIP_B, CHIP_B, CHIP_C, CHIP_C, CHIP_D, CHIP_D, CHIP_E, CHIP_K, CHIP_F, CHIP_F, CHIP_G, CHIP_G, CHIP_H, CHIP_H},//X MAP fixed  {CHIP_L,  t2,t3, t4, t5, t6, t7, t8}},  // Y MAP fixed
... {10,'Okay', {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}, // x standing {-1,-1,-1,-1,-1,-1,-1,-1}, //y standing {NANO_A0, NANO_A1, NANO_A2, NANO_A3, NANO_D2, NANO_D3, NANO_D4, NANO_D5,...

Read more »

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top