Skip to content
Snippets Groups Projects
Commit e57f008a authored by Gijs Schoonderbeek's avatar Gijs Schoonderbeek
Browse files

Modified the scripts to run on Raspberry Pi.

Script will check if it is run on a PI, in that case a different I2C serial library is used.
parent 5c8a9709
No related branches found
No related tags found
1 merge request!2Modified the scripts to run on Raspberry Pi.
''' '''
Copyright 2021 Stichting Nederlandse Wetenschappelijk Onderzoek Instituten,
ASTRON Netherlands Institute for Radio Astronomy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Set ADC Set ADC
''' '''
import sys import sys
import time import time
sys.path.insert(0,'.') sys.path.insert(0,'.')
import os
if os.name =="posix":
from I2C_serial_pi import *
else:
from I2C_serial import * from I2C_serial import *
sleep_time=0.05 sleep_time=0.05
......
''' '''
Set ADC Copyright 2021 Stichting Nederlandse Wetenschappelijk Onderzoek Instituten,
ASTRON Netherlands Institute for Radio Astronomy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Test script to write single registers of RCU2_ADC
''' '''
import sys import sys
import time import time
sys.path.insert(0,'.') sys.path.insert(0,'.')
import os
if os.name =="posix":
from I2C_serial_pi import *
else:
from I2C_serial import * from I2C_serial import *
sleep_time=0.05 sleep_time=0.05
......
''' '''
Set ADC Copyright 2021 Stichting Nederlandse Wetenschappelijk Onderzoek Instituten,
ASTRON Netherlands Institute for Radio Astronomy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Set PCC_CLK
''' '''
import sys import sys
import time import time
sys.path.insert(0,'.') sys.path.insert(0,'.')
import os
if os.name =="posix":
from I2C_serial_pi import *
else:
from I2C_serial import * from I2C_serial import *
sleep_time=0.05 sleep_time=0.05
......
''' '''
Set ADC Copyright 2021 Stichting Nederlandse Wetenschappelijk Onderzoek Instituten,
ASTRON Netherlands Institute for Radio Astronomy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Test script to write single registers of PCC_CLK.
''' '''
import sys import sys
import time import time
sys.path.insert(0,'.') sys.path.insert(0,'.')
import os
if os.name =="posix":
from I2C_serial_pi import *
else:
from I2C_serial import * from I2C_serial import *
sleep_time=0.05 sleep_time=0.05
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment