IOT Raspberry Pi Programs
We have decided not to make the programs available as a download because this is not the point of the book - the programs are not finished production code but something you should type in and study.
The best solution is to provide the source code of the programs in a form that can be copied and pasted into a NetBeans of VS Code project.
Note: The VS Code task listings are at the very end of this page.
The only downside is that you have to create a project to paste the code into.
To do this follow the instructionin the book- in particular remember to add the bcm2835 library and also any library references that may be needed.
All of the programs below were copy and pasted from working programs in the IDE.
If anything you consider important is missing or if you have any requests or comments contact me
This email address is being protected from spambots. You need JavaScript enabled to view it.
Page 32
Page 38
Page 50
Page 54
Page 56
Page 57
Page 58
Page 59
Page 60
Page 81
Page 82
Page 83
Page 84
Page 85
Page 86
Page 89
Page 91
Page 92
Page 103
Page 106
Page 107
Page 114
Page 118
Page 119
Page 120
Page 124
Page 129
page 131
Page 143
Page 144
Page 145
Page 147
Page 148
Page 150
Page 151
Page 152
Page 155
Page 156
Page 158
Page 160
Page 178
Page 178
Page 180
Page 184
Page 195
Page 216
Page 227
Page 243
function only - needs a main program to call it
Page 265
Page 266
Page 275
Page 276
Page 278
Page 284
Page 299
Page 308
Page 320
Page 322
Page 327
Page 346
Page 351
Page 365
Page 358
Page 370
Page 375
Page 379
Page 382
Page 386
Page 387
Appendix II
All files have to be stored in the .vscode folder
settings,json
launch.json
c_cpp_properties.json
tasks.json
"showReuseMessage": true,
}
},
{
"label": "copyARMheaders",
"type": "shell",
"command": "mkdir ${workspaceFolder}/include/;scp -r ${config:sshUser}@${config:sshEndpoint}:/usr/include ${workspaceFolder}/include/ ",
"problemMatcher": [],
"presentation": {
"showReuseMessage": true,
"clear": true
}
},
],
}