Fish Tank Assembly Notes
/ to continue, ...
...
tlfong01 wrote: ↑Wed Dec 12, 2018 5:31 amSPI Testing Notes
Now I am using my new scope to display the waveforms of the SPI Clock and Mosi signals of repeatedly sending single characters at 100KHz. So far so good. For now I am only checking out the 3V3 level signals. Next step is checking the level shifted up 5V0 signals.
tlfong01 wrote: ↑Fri Dec 14, 2018 8:49 amSPI TXS0104 Level Shifting from 3V3 to 5V0 looks OKtlfong01 wrote: ↑Wed Dec 12, 2018 5:31 amSPI Testing Notes
Now I am using my new scope to display the waveforms of the SPI Clock and Mosi signals of repeatedly sending single characters at 100KHz. So far so good. For now I am only checking out the 3V3 level signals. Next step is checking the level shifted up 5V0 signals.
...
Code: Select all
# *** spi012018dec1901.py 2018dec19hkt1543 ***
#
# Program Function
# ----------------
# The program is used to detect if the SPI port can repeatedly send out single bytes. This ia the
# very first program to check out if SPI port is working. The next program will be a SPI loopback
# program to check out if the SPI port and send and receive single characters.
# Program Description
# -------------------
# This program repeats 200,000 times sending a byte 0x55, pausing 0.00005 second after each byte.
# The SPI port frequency is set at 100kHz, therefore each bit time = 1 sec / 100k = 1000k uS / 100k
# = 10uS, and each char of default 8N1 (8 bits + no parity + 1 stop bit = 9 bits) = 10uS x 9 = 90uS
# Pause after sending each byte = 0.00005 sec = 1,000,000uS x 0.0005 = 500 uS
# Oscilloscope should display one 90uS long 9 bit pattern separated by 500uS pauses
#
# Hardware/Software Descritption
# ------------------------------
# Rpi3B+, Raspbian Version 2018 November, python 3.5.3
#
# Debugging Notes
# ---------------
# Import Modules
import spidev
from time import sleep
# Create and Config SPI Port
spiPort = spidev.SpiDev()
spiPort.open(0,0)
spiPort.max_speed_hz = 10000 # 100kHz
# TestFunction
def repeatSendByte(spiPort, sendByte, pauseTimeBetweenBytes, repeatCount):
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
print('Begin repeatSendByte(),....')
for i in range(repeatCount):
spiSendRecvOneByte(spiPort, sendByte)
sleep(pauseTimeBetweenBytes)
print('End repeatSendByte().')
return
# Initialization
sendByte = 0x5a
pauseTime = 0.005
repeatCount = 200000000000
# Main
repeatSendByte(spiPort, sendByte, pauseTime, repeatCount)
# End
Code: Select all
# *** spi012018dec2103.py 2018dec21hkt2045 ***
#
# Program Function
# ----------------
# This program has the following test functions:
# 1. repeatSendByte() - to detect if the SPI port can repeatedly send out single bytes. This ia the
# very first program to check out if SPI port is working.
# 2. loopBackTest() - to test if the SPI port can send and receive bytes.
# Function Description
# ---------------------
# 1. testRepeatSendByte()
# This function repeats 200,000 times sending a byte 0x55, pausing 0.00005 second after each byte.
# The SPI port frequency is set at 100kHz, therefore each bit time = 1 sec / 100k = 1000k uS / 100k
# = 10uS, and each char of default 8N1 (8 bits + no parity + 1 stop bit = 9 bits) = 10uS x 9 = 90uS.
# Pause after sending each byte = 0.00005 sec = 1,000,000uS x 0.0005 = 500 uS
# Oscilloscope should display one 90uS long 9 bit pattern separated by 500uS pauses
#
# 2. testLoopbackOneByte()
# This function tests sending one byte to MSOI and read it back from MISO, with the two pins
# connected together, forming a loopback or echo back.
#
# Hardware/Software Descritption
# ------------------------------
# Rpi3B+, Raspbian Version 2018 November, python 3.5.3
# Import Modules
import spidev
from time import sleep
# TestFunctions
def testRepeatSendByte(spiPort, spiSpeed, sendByte, pauseTimeBetweenBytes, repeatCount):
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
print('Begin repeatSendByte(),....')
spiPort.max_speed_hz = spiSpeed
for i in range(repeatCount):
spiSendRecvOneByte(spiPort, sendByte)
sleep(pauseTimeBetweenBytes)
print('End repeatSendByte().')
return
def testLoopBackOneByte(spiPort, spiSpeed, sendByte):
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
spiPort.max_speed_hz = spiSpeed
recvByteArray = spiSendRecvOneByte(spiPort, sendByte)
recvByte = recvByteArray[0]
print('')
print(' sendByte = ', hex(sendByte))
print(' recvByte = ', hex(recvByte))
print('')
return
# Initialization
spiPort00 = spidev.SpiDev()
spiPort00.open(0,0)
spiPort = spiPort00
spiSpeed = 10000
sendByte = 0x5b
pauseTime = 0.005
repeatCount = 200000000000
# Main
# testRepeatSendByte(spiPort, spiSpeed, sendByte, pauseTime, repeatCount)
testLoopBackOneByte(spiPort, spiSpeed, sendByte)
# End
Code: Select all
# *** spi012018dec2105.py 2018dec21hkt2142 ***
#
# Program Function
# ----------------
# This program has the following test functions:
# 1. repeatSendByte() - to detect if the SPI port can repeatedly send out single bytes. This ia the
# very first program to check out if SPI port is working.
# 2. loopBackTest() - to test if the SPI port can send and receive bytes.
# Function Description
# ---------------------
# 1. testRepeatSendByte()
# This function repeats 200,000 times sending a byte 0x55, pausing 0.00005 second after each byte.
# The SPI port frequency is set at 100kHz, therefore each bit time = 1 sec / 100k = 1000k uS / 100k
# = 10uS, and each char of default 8N1 (8 bits + no parity + 1 stop bit = 9 bits) = 10uS x 9 = 90uS.
# Pause after sending each byte = 0.00005 sec = 1,000,000uS x 0.0005 = 500 uS
# Oscilloscope should display one 90uS long 9 bit pattern separated by 500uS pauses
#
# 2. testLoopbackOneByte()
# This function tests sending one byte to MSOI and read it back from MISO, with the two pins
# connected together, forming a loopback or echo back.
#
# 3. testLoopbackTwoBytes()
# 4. testLoopbackThreeBytes()
#
# Hardware/Software Descritption
# ------------------------------
# Rpi3B+, Raspbian Version 2018 November, python 3.5.3
# Import Modules
import spidev
from time import sleep
# Send receive one, two, and three bytes
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
def spiSendRecvTwoBytes(spiPort, sendByte1, sendByte2):
sendByteArray = [sendByte1, sendByte2]
recvByteArray = spiPort.xfer(sendByteArray)
return recvByteArray
def spiSendRecvThreeBytes(spiPortNum, sendByte1, sendByte2, sendByte3):
sendByteArray = [sendByte1, sendByte2, sendByte3]
recvByteArray = spiPort.xfer(sendByteArray)
return recvByteArray
# TestFunctions
def testRepeatSendByte(spiPort, spiSpeed, sendByte, pauseTimeBetweenBytes, repeatCount):
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
print('Begin repeatSendByte(),....')
spiPort.max_speed_hz = spiSpeed
for i in range(repeatCount):
spiSendRecvOneByte(spiPort, sendByte)
sleep(pauseTimeBetweenBytes)
print('End repeatSendByte().')
return
def testLoopBackOneByte(spiPort, spiSpeed, sendByte):
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer2(sendByteArray)
return recvByteArray
spiPort.max_speed_hz = spiSpeed
recvByteArray = spiSendRecvOneByte(spiPort, sendByte)
recvByte = recvByteArray[0]
print('\nBegin testLoopbackOneByte(),....')
#print('')
print(' sendByte = ', hex(sendByte))
print(' recvByte = ', hex(recvByte))
#print('')
print('End testLoopbackOneByte(),....')
return
def testLoopBackTwoBytes(spiPort, spiSpeed, sendByte1, sendByte2):
spiPort.max_speed_hz = spiSpeed
recvByteArray = spiSendRecvTwoBytes(spiPort, sendByte1, sendByte2)
print('\nBegin testLoopbackTwoBytes(),....')
print(' sendBytes = ', hex(sendByte1), hex(sendByte2))
print(' recvBytes = ', hex(recvByteArray[0]), hex(recvByteArray[1]))
print('End testLoopbackTwoBytes(),....')
return
def testLoopBackThreeBytes(spiPort, spiSpeed, sendByte1, sendByte2, sendByte3):
spiPort.max_speed_hz = spiSpeed
recvByteArray = spiSendRecvThreeBytes(spiPort, sendByte1, sendByte2, sendByte3)
print('\nBegin testLoopbackThreeBytes(),....')
print(' sendBytes = ', hex(sendByte1), hex(sendByte2), hex(sendByte3))
print(' recvBytes = ', hex(recvByteArray[0]), hex(recvByteArray[1]), hex(recvByteArray[2]))
print('End testLoopbackThreeBytes(),....')
return
# Initialization
spiPort00 = spidev.SpiDev()
spiPort00.open(0,0)
spiPort = spiPort00
spiSpeed = 10000
pauseTime = 0.005
repeatCount = 200000000000
sendByte = 0x5b
sendByte1 = 0x55
sendByte2 = 0x77
sendByte3 = 0x88
# Main
# testRepeatSendByte(spiPort, spiSpeed, sendByte, pauseTime, repeatCount)
testLoopBackOneByte(spiPort, spiSpeed, sendByte)
testLoopBackTwoBytes(spiPort, spiSpeed, sendByte1, sendByte2)
testLoopBackThreeBytes(spiPort, spiSpeed, sendByte1, sendByte2, sendByte3)
# End
# Sample output 2018dec21hkt2141
'''
Begin testLoopbackOneByte(),....
sendByte = 0x5b
recvByte = 0x5b
End testLoopbackOneByte(),....
Begin testLoopbackTwoBytes(),....
sendBytes = 0x55 0x77
recvBytes = 0x55 0x77
End testLoopbackTwoBytes(),....
Begin testLoopbackThreeBytes(),....
sendBytes = 0x55 0x77 0x88
recvBytes = 0x55 0x77 0x88
End testLoopbackThreeBytes(),....
'''
Code: Select all
# mcp23s17_2018dec2504.py tlfong01 2018dec25hkt1439 ***
# $ hostnamectl = raspberrypi Raspbian GNU/Linux 9 (stretch) Linux 4.14.34-v7+ arm
# >>> sys.version = 3.5.3 Jan 19 2017
import datetime
import time
from time import sleep
import sys
import spidev
spiPort00 = spidev.SpiDev()
spiPort00.open(0,0)
spiPort00.max_speed_hz = 10000
# *** General SPI Device Register Functions ***
# *** Send receive one, two, and three bytes ***
def spiSendRecvOneByte(spiPort, sendByte):
sendByteArray = [sendByte]
recvByteArray = spiPort.xfer(sendByteArray)
return recvByteArray
def spiSendRecvTwoBytes(spiPort, sendByte1, sendByte2):
sendByteArray = [sendByte1, sendByte2]
recvByteArray = spiPort.xfer(sendByteArray)
return recvByteArray
def spiSendRecvThreeBytes(spiPort, sendByte1, sendByte2, sendByte3):
sendByteArray = [sendByte1, sendByte2, sendByte3]
recvByteArray = spiPort.xfer(sendByteArray)
return recvByteArray
# *** Mcp23s17 register read/write functions ***
def mcp23S17WriteDvRegOneByte(spiPort, dvSubAddr, dvRegAddr, writeByte):
dvWriteBaseAddr = 0x40
dvAddr = dvWriteBaseAddr | (dvSubAddr << 1)
spiSendRecvThreeBytes(spiPort, dvAddr, dvRegAddr, writeByte)
return
def mcp23S17ReadDvRegOneByte(spiPort, dvSubAddr, dvRegAddr):
dvReadBaseAddr = 0x41
dvAddr = dvReadBaseAddr | (dvSubAddr << 1)
dummyByte = 0x00
recvByteArray = spiSendRecvThreeBytes(spiPort, dvAddr, dvRegAddr, dummyByte)
return recvByteArray[2]
# SPI Test Functions
def testRepeatSendByte(spiPort, sendByte, pauseTimeBetweenBytes, repeatCount):
print('\nBegin repeatSendByte(),....')
for i in range(repeatCount):
spiSendRecvOneByte(spiPort, sendByte)
sleep(pauseTimeBetweenBytes)
print('End repeatSendByte().')
return
def testLoopBackOneByte(spiPort, sendByte):
recvByteArray = spiSendRecvOneByte(spiPort, sendByte)
recvByte = recvByteArray[0]
print('\nBegin testLoopbackOneByte(),....')
#print('')
print(' sendByte = ', hex(sendByte))
print(' recvByte = ', hex(recvByte))
#print('')
print('End testLoopbackOneByte(),....')
return
def testLoopBackTwoBytes(spiPort, sendByte1, sendByte2):
recvByteArray = spiSendRecvTwoBytes(spiPort, sendByte1, sendByte2)
print('\nBegin testLoopbackTwoBytes(),....')
print(' sendBytes = ', hex(sendByte1), hex(sendByte2))
print(' recvBytes = ', hex(recvByteArray[0]), hex(recvByteArray[1]))
print('End testLoopbackTwoBytes(),....')
return
def testLoopBackThreeBytes(spiPort, sendByte1, sendByte2, sendByte3):
recvByteArray = spiSendRecvThreeBytes(spiPort, sendByte1, sendByte2, sendByte3)
print('\nBegin testLoopbackThreeBytes(),....')
print(' sendBytes = ', hex(sendByte1), hex(sendByte2), hex(sendByte3))
print(' recvBytes = ', hex(recvByteArray[0]), hex(recvByteArray[1]), hex(recvByteArray[2]))
print('End testLoopbackThreeBytes(),....')
return
def testRepeatSendByte1():
sendByte = 0x5b
pauseSecond = 0.0015
repeatCount = 20000000
testRepeatSendByte(spiPort00, sendByte, pauseSecond, repeatCount)
return
def testLoopBackOneByte1():
spiPort = spiPort00
sendByte = 0x5b
testLoopBackOneByte(spiPort, sendByte)
return
def testLoopBackTwoBytes1():
spiPort = spiPort00
sendByte1 = 0x55
sendByte2 = 0x77
testLoopBackTwoBytes(spiPort, sendByte1, sendByte2)
return
def testLoopBackThreeBytes1():
spiPort = spiPort00
sendByte1 = 0x55
sendByte2 = 0x77
sendByte3 = 0x88
testLoopBackThreeBytes(spiPort, sendByte1, sendByte2, sendByte3)
return
# *** MCP23S17 Test Functions ***
def testRepeatWriteIoDirA():
ioConA = 0x0a
ioDirA = 0x00
enableHardAddr = 0x04
byte0x55 = 0x55
repeatCount = 200000000
pauseSeconds = 0.0015
print(' Repeat write IoDdirA, ...')
mcp23S17WriteDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = ioConA, writeByte = enableHardAddr)
for i in range(repeatCount):
mcp23S17WriteDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = ioDirA, writeByte = byte0x55)
sleep(pauseSeconds)
return
def testRepeatReadIoDirA():
ioConA = 0x0a
ioDirA = 0x00
enableHardAddr = 0x04
byte0x55 = 0x55
dummyByte = 0x00
repeatCount = 200000000
pauseSeconds = 0.0015
print(' Repeat read IoDirA, ...')
mcp23S17WriteDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = ioConA, writeByte = enableHardAddr)
for i in range(repeatCount):
mcp23S17ReadDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = ioDirA)
sleep(pauseSeconds)
print(hex(recvByteArray[0]), hex(recvByteArray[1]), hex(recvByteArray[2]))
return
def testRepeatWriteReadIpolA():
ioConA = 0x0a
ioDirA = 0x00
iPolA = 0x02
enableHardAddr = 0x04
byte0x55 = 0x55
dummyByte = 0x00
repeatCount = 200000000
print(' Repeat write/read reg, ...')
mcp23S17WriteDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = ioConA, writeByte = enableHardAddr)
for i in range(repeatCount):
mcp23S17WriteDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = iPolA, writeByte = byte0x55)
sleep(0.006)
mcp23S17ReadDvRegOneByte(spiPort = spiPort00, dvSubAddr = 0b000, dvRegAddr = iPolA)
sleep(0.006)
print(hex(recv5yteArray[0]), hex(recvByteArray[1]), hex(recvByteArray[2]))
return
Code: Select all
functionList0 = [ \
'MCP23S17 / MCP23017 Test Functions',
[
['1', ['spiTestFunctions()' , testFunctions1]],
['2', ['mcp23s17TestFunctions()' , testFunctions2]],
['3', ['mcp23017TestFunctons()' , testFunctions3]],
['x', ['Exit' , exitMenu]],
]
]
functionList1 = [ \
'SPI Test Functions',
[
['1', ['testRepeatSendOneByte()' , testRepeatSendOneByte]],
['2', ['testLoopbackOneByte()' , testLoopbackOneByte]],
['3', ['testLoopbackTwoBytes()' , testLoopbackTwoBytes]],
['4', ['testLoopbackThreeBytes()' , testLoopbackThreeBytes]],
['x', ['Exit' , exitMenu]],
]
]
functionList2 = [ \
'MCP23S17 Test Functions',
[
['1', ['testRepeatWriteIoDirA()' , testRepeatWriteIoDirA]],
['2', ['testRepeatReadIoDirA()' , testRepeatReadIoDirA]],
['3', ['testRepeatWriteReadIoDirA()' , testRepeatWriteReadIpolA]],
['4', ['testOnceWriteIoDirA()' , testOnceWriteIoDirA]],
['5', ['testOnceReadIoDirA()' , testOnceReadIoDirA]],
['6', ['testBlinkGpioPort()' , testBlinkGpioPort]],
['x', ['Exit' , exitMenu]],
]
]
tlfong01 wrote: ↑Tue Dec 25, 2018 1:34 pmTidying up messy SPI and MCP23S17 test functions[/b]
Instead of starting trying another SPI device, I think I better write another function, blink the mcp23s17 Gpio ports, just to make sure I can at least write to the registers correctly, even though no luck in reading the registers.[/color]
tlfong01 wrote: ↑Tue Dec 25, 2018 2:29 pmInstead of starting trying another SPI device, I think I better write another function, blink the mcp23s17 Gpio ports, just to make sure I can at least write to the registers correctly, even though no luck in reading the registers.
MCP23S17 GPIO Blink LED Function Writing Notes
Now I have wired another MCP23S17 chip on a bread board for easy swap testing.[/color]
tlfong01 wrote: ↑Wed Dec 26, 2018 2:57 amNow I have wired another MCP23S17 chip on a bread board for easy swap testing.[/i]
On second thought, perhaps I should first check out the 8-bit MCP23S08, to make sure that I have not mixed up MCP23S17's 8bit/16bit Band0/Band1 names.
MCP23S08 is 8 bit only, therefore no risk of mixing up names.![]()
AliExpress MCP23S08/008
https://www.aliexpress.com/store/produc ... 27139.html
Code: Select all
The Future of Programming - Uncle Bob 2016may18 624,576 views
https://www.youtube.com/watch?v=ecIWPzGEbFc
How did our industry start, what paths did it take to get to where we are, and
where is it going. What big problems did programmers encounter in the past?
How were they solved? And how do those solutions impact our future?
What mistakes have we made as a profession; and how are we going to correct
them. In this talk, Uncle Bob describes the history of software, from
it’s beginnings in 1948 up through the current day; and then beyond.
By looking at our past trajectory, we try to plot out where our profession
is headed, and what challenges we’ll face along the way.
Robert C. Martin (Uncle Bob) has been a programmer since 1970. He is the
Master Craftsman at 8th Light inc, an acclaimed speaker at conferences
worldwide, and the author of many books including: The Clean Coder,
Clean Code, Agile Software Development: Principles, Patterns, and Practices,
and UML for Java Programmers.
When Good Engineers Write Bad Software - Stephen Cass IEEE Spectrum 2018dec27
https://spectrum.ieee.org/geek-life/reviews/when-good-engineers-write-bad-software
Adam Barr: Fifty years ago there was a NATO Software Engineering Conference,
where the term “software engineering” was first advanced. Everyone decided
that software engineering is not really engineering and we had to fix that. ...
There’s a difference between small pieces of software and large pieces of
software. Small being what you do in school, working with one or two people
on some project. Large software is what industry makes, which is worked on
by multiple people, and most importantly not necessarily by the same people
over its lifetime.... They’re really very different in what you have to do.
So people get to industry, and all these things like maintainability,
readability, securability, manageability—they haven’t learned any of that
and have to reinvent it.... Companies like IBM had been studying this in
the ’70s, and had made some progress on turning software into an engineering
discipline. That essentially all got thrown away. The invasion of people
[during the personal computer revolution], from Bill Gates on down,
basically ignored everything that came before them.
In the life of a software developer, my concern is that by the time you get
out of college you’ve succeeded without having to really learn a body of knowledge the way a lot of other engineering disciplines do.
So there’s a period of time before you kind of clue in, and that could be avoided.
(The academic side could teach) knowledge that was more relevant in the industry,
so you’d be productive sooner when you started.
How to Write a Really Object Oriented Program, Marcell Lipp, CodeProject,
2018dec27
https://www.codeproject.com/Articles/1272898/%2FArticles%2F1272898%2FHow-to-Write-a-Really-Object-Oriented-Program
Principles of Object Oriented Programming
First of all, let’s see the official definition of OOP. I found a clear
definition here.
It says:
“Object-oriented programming (OOP) is a software programming model
constructed around objects. This model compartmentalizes data into
objects (data fields) and describes object contents and behavior through
the declaration of classes (methods).
OOP features include the following:
Encapsulation: This makes the program structure easier to manage because
each object’s implementation and state are hidden behind well-defined
boundaries.
Polymorphism: This means abstract entities are implemented in multiple ways.
Inheritance: This refers to the hierarchical arrangement of implementation
fragments.
Object-oriented programming allows for simplified programming. Its benefits
include reusability, refactoring, extensibility, maintenance and efficiency.”
Let’s stuck first at the features:
Encapsulation: I think this is the most important one. Each of the objects
has a state which is hidden for other objects. And on the other hand, there
is an “implementation” for each object. I understand under that the member
functions of the objects. And the state and the implementation together is
one unit or with OOP terminology one object. So if your object is a rectangle,
it will have a state with elements like width, high, position, colour,
etc. And it will have an implementation, implemented member functions,
like: move, resize, paint, etc. And this is one object, not less, not more.
Inheritance: I would mention it before the polymorphism, because otherwise,
it is difficult to understand it. Inheritance stands for the connection
between parent/child classes alias base/inherited classes. So for each class,
you can define so called child classes which can do everything that the
base class can to (has the same public methods and member variables), but
it can overdefine the implementation of the methods and it can extend the
functionality (introduce new member functions and member variables).
For example, you have a class for animals. Each animal can move itself.
But how they can move themselves if different for each animal.
So the different animals will be inherited from the Animal base class
and will override the implementation of move method. Plus some animals
have some extra skills, like a dog can bark. So you can define a bark
method for the Dog class.
Polymorphism: This is exactly what I told about the move method of the
animals. You can have, for example, a collection of animals and you can
call the move method for each of them and you shouldn’t mind how it is
implemented for the animal.
That’s the official theory. Let’s go further with some practical theory.
Developers Are Coding for the Love of It (Plus the Money) - Nick Kolakowski
2018dec27
https://insights.dice.com/2018/12/27/developer-coding-love-money/
According to Stack Overflow’s (extensive and essential) Developer Survey,
more than 80 percent of developers code as a hobby outside of work. Not
only that, but those developers with extensive non-programming
responsibilities, such as parenting or an affinity for the outdoors,
were “slightly more likely to code as a hobby than other groups.”
In 2017, another survey by Stack Overflow (unrelated to their Developer
Survey) found that developers tend to engage with different programming
languages in their hobbyist work than their day-jobs; on weekends,
they used Haskell, Assembly, and OpenGL, in contrast to workweeks dominated
by the likes of Sharepoint, Powershell, and other, more enterprise-centric
platforms.
“If we look for the tags that have increased the most in weekend activity,
we see the game engine Unity3D, as well as a number of tags used for
building mobile apps,” Stack Overflow noted at the time. “It looks like
developers are designing more games and apps on the weekends now than
in previous years.”
It seems unlikely that those trends have wavered much over the past year;
many developers enjoy toying with the newest languages and platforms to
come onto the market, even ones that have no bearing on their salaried work.
In any case, for many developers, coding isn’t just a job—it’s a…
okay, okay, we’ll stop now.
tlfong01 wrote: ↑Sat Dec 29, 2018 8:37 amThe only conclusion is that my program is bad!
New Year Resolution 2019 - Write Good Programs!
I think one of the main reasons is that I am not serious at all, just coding for fun, without any sense of discipline (Alan Turing 1945)
My 2019 Year Resolution is to write good engineering programs. So I started googling good references and tutorials, including the following:
The Future of Programming - Uncle Bob 2016may18 624,576 views
https://www.youtube.com/watch?v=ecIWPzGEbFc
Code: Select all
Summary/Table of Contents of this thread
READING OLD WEIGHT SCALE Postby Neomorph » 2018-Nov-18 Sun 12:03 am
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1393160
HX711 Where to start
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1393745
HX711 Summary
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1393796
Load Cell, Wheatstone Bridge, Strain Measurement, and Testing Notes
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1393813
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1395158
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1395349
HX711 ESP8266 WeMos D1 Mini Setup and Testing
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1394199
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1394216
Digital Scale Tearing Down Notes
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137#p1395288
HX711 Programming Notes
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=25#p1395969
HX711 Using ESP8266 NodeMCU Lua
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=25#p1395969
I2C and MCP23017 Programming for HX711
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=50#p1397916
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1400984
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1401422
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1401804
MCP23017 Programming - Memory Refreshing Old Posts
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1400599
Rpi Stretch Setup Notes
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=50#p1400274
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1400484
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1400488
SPI and MCP23S17 Testing
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1401555
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1401839
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1402397
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1402872
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=100#p1403249
Washing Machine Top Bench Setup
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=75#p1403243
Programming Notes
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=100#p1409335
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=227137&start=100#p1418611