Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added IMG_3944.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IMG_3945.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IMG_3946.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 75 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,83 @@ basic.forever(() => {
})
```
## The Combined And and Not Gate
The code for the combined And and Not gates:
```js
let qrt = 0
let gate = 0
input.onButtonPressed(Button.A, () => {
if (gate == 0) {
gate = 1
} else {
gate = 0
}
})
input.onButtonPressed(Button.B, () => {
if (qrt == 100) {
qrt = 0
} else {
qrt = 100
}
})
basic.forever(() => {
basic.clearScreen()
while (qrt == 100) {
while (gate == 1 && qrt == 100) {
if (pins.digitalReadPin(DigitalPin.P1) == 0 && pins.digitalReadPin(DigitalPin.P2) == 0) {
pins.digitalWritePin(DigitalPin.P0, 0)
basic.showLeds(`
. . # . .
. # . # .
. # . # .
. # . # .
. . # . .
`)
} else {
pins.digitalWritePin(DigitalPin.P0, 1)
basic.showLeds(`
. . # . .
. # # . .
. . # . .
. . # . .
. # # # .
`)
}
}
while (gate == 0 && qrt == 100) {
if (pins.digitalReadPin(DigitalPin.P1) == 1 && pins.digitalReadPin(DigitalPin.P2) == 1) {
pins.digitalWritePin(DigitalPin.P0, 1)
basic.showLeds(`
. . # . .
. # # . .
. . # . .
. . # . .
. # # # .
`)
} else {
pins.digitalWritePin(DigitalPin.P0, 0)
basic.showLeds(`
. . # . .
. # . # .
. # . # .
. # . # .
. . # . .
`)
}
}
}
})

```

## The Finished Product
![alt text](https://github.com/CodeGuild-co/MicroBlocks/blob/master/IMG_3944.jpeg)
![alt text](https://github.com/CodeGuild-co/MicroBlocks/blob/master/IMG_3945.jpeg)
![alt text](https://github.com/CodeGuild-co/MicroBlocks/blob/master/IMG_3946.jpeg)

Team:
- Halle Gordon-Jeary: Power Point And Script Writer
- Orla Brimacombe: Jokes Person innit, Hypeman/Woman, Moral Supporter, Potato Searcher, SpellCheck and Editor.
- Asma Mansur: Encapsulation Designer
- Jeevan Dominguez: Project Manager, And Circuit Designer
- Almaz Ahmad : Lead Programmer
- Halle Gordon-Jeary
- Orla Brimacombe
- Asma Mansur
- Jeevan Dominguez
- [Almaz Ahmad](https://github.com/sp1d5r)