aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomasintAnker <thomasintanker1@gmail.com>2024-06-21 15:23:24 +0200
committerThomasintAnker <thomasintanker1@gmail.com>2024-06-21 15:23:24 +0200
commit454032718251eac7788c4d1b45767c18c0aa11ed (patch)
tree0d398a287b354d9e5d5e93765b0ac2609e3dda14
parentd38d1f7abd1b91b216172f1d356cec2124e62fac (diff)
Changed order of researcg
-rw-r--r--docs/research.adoc25
1 files changed, 15 insertions, 10 deletions
diff --git a/docs/research.adoc b/docs/research.adoc
index 4f64538..65cc68b 100644
--- a/docs/research.adoc
+++ b/docs/research.adoc
@@ -526,8 +526,7 @@ group's respective design document.
=== Research question
-How can we use I^2^C for the internal communication between puzzle modules
-and the main controller, and how can we detect new puzzle modules using I^2^C?
+How can we use I^2^C for the puzzle module detection?
=== Puzzle Module Detection
@@ -535,9 +534,9 @@ Puzzle module detection is vital to the puzzelbox, as this allows changing the
puzzles without much software or hardware configuration needed. An option will
be given for the choice of main controller (RP2040); namely to scan the full
I^2^C bus for responsive slaves. The RPI Pico SDK has an API for I^2^C which
-also supports functions create a bus scanning function. An example of just the
-bus scan function according to the API examples can be found in the code block
-below.
+also supports functions create a bus scanning function. An example of this
+bus scan function, according to the API examples, can be found in the pseudo
+code below.
[source, c]
----
@@ -556,14 +555,20 @@ void bus_scan() {
}
printf("Done.\n");
}
-
----
-// TODO: references (API) & code block naming?
-
-=== Arduino
-
+The bus scan function tries to read data from all possible I^2^C addresses,
+and prints a table which shows what the addresses are from found I^2^C
+slaves. This is possible due to the i2c_read_blocking function, which returns
+the length of the read data if the slave address is in use (in this case 1) or
+a number below 0 if the slave address is not in use. The puzzelbox, however,
+has the 'Neotrellis' puzzle which also uses I^2^C to function. The bus scan
+function would also see the 'Neotrellis' rgb matrix as a puzzle module (slave)
+using this implementation. This can easily be fixed using a handshake between
+puzzle modules and the main controller, as the 'Neotrellis' rgb matrix cannot
+answer this handshake and is therefor not recognized as a puzzle module.
+// TODO: references (API) & code block naming?
== Research of hardware designs of previous groups (21-22 and 22-23)